Commit 9aed9deb authored by Taylor Otwell's avatar Taylor Otwell

Tweak how console commands are registered.

parent ec9edec9
...@@ -5,6 +5,15 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel; ...@@ -5,6 +5,15 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel { class Kernel extends ConsoleKernel {
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
'App\Console\Commands\InspireCommand',
];
/** /**
* Run the console application. * Run the console application.
* *
......
...@@ -17,7 +17,7 @@ class Kernel extends HttpKernel { ...@@ -17,7 +17,7 @@ class Kernel extends HttpKernel {
'Illuminate\Session\Middleware\ReadSession', 'Illuminate\Session\Middleware\ReadSession',
'Illuminate\Session\Middleware\WriteSession', 'Illuminate\Session\Middleware\WriteSession',
'Illuminate\View\Middleware\ShareErrorsFromSession', 'Illuminate\View\Middleware\ShareErrorsFromSession',
'App\Http\Middleware\CsrfTokenIsValid', 'App\Http\Middleware\VerifyCsrfToken',
]; ];
/** /**
......
...@@ -4,7 +4,7 @@ use Closure; ...@@ -4,7 +4,7 @@ use Closure;
use Illuminate\Contracts\Routing\Middleware; use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Session\TokenMismatchException; use Illuminate\Session\TokenMismatchException;
class CsrfTokenIsValid implements Middleware { class VerifyCsrfToken implements Middleware {
/** /**
* Handle an incoming request. * Handle an incoming request.
......
<?php namespace App\Providers;
use InspireCommand;
use Illuminate\Support\ServiceProvider;
class ArtisanServiceProvider extends ServiceProvider {
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->commands('App\Console\Commands\InspireCommand');
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return ['App\Console\Commands\InspireCommand'];
}
}
...@@ -98,7 +98,6 @@ return [ ...@@ -98,7 +98,6 @@ return [
/* /*
* Application Service Providers... * Application Service Providers...
*/ */
'App\Providers\ArtisanServiceProvider',
'App\Providers\EventServiceProvider', 'App\Providers\EventServiceProvider',
'App\Providers\LogServiceProvider', 'App\Providers\LogServiceProvider',
'App\Providers\RouteServiceProvider', 'App\Providers\RouteServiceProvider',
......
...@@ -15,7 +15,6 @@ return [ ...@@ -15,7 +15,6 @@ return [
'files' => [ 'files' => [
__DIR__.'/../app/Providers/ArtisanServiceProvider.php',
__DIR__.'/../app/Providers/EventServiceProvider.php', __DIR__.'/../app/Providers/EventServiceProvider.php',
__DIR__.'/../app/Providers/LogServiceProvider.php', __DIR__.'/../app/Providers/LogServiceProvider.php',
__DIR__.'/../app/Providers/RouteServiceProvider.php', __DIR__.'/../app/Providers/RouteServiceProvider.php',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment