Skip to content

Commit

Permalink
Add service provider along with package autodiscovery (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
erjanmx authored Dec 20, 2017
1 parent 4af29af commit 2176be6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,12 @@
},
"config": {
"sort-packages": true
}
},
"extra": {
"laravel": {
"providers": [
"Erjanmx\\MigrateCheck\\MigrateCheckServiceProvider"
]
}
}
}
30 changes: 30 additions & 0 deletions src/MigrateCheckServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Erjanmx\MigrateCheck;

use Illuminate\Support\ServiceProvider;
use Erjanmx\MigrateCheck\Commands\MigrateCheckCommand;

class MigrateCheckServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;

/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
if ($this->app->runningInConsole()) {
$this->commands([
MigrateCheckCommand::class,
]);
}
}
}

0 comments on commit 2176be6

Please sign in to comment.