Tweak how console commands are registered.
This commit is contained in:
parent
ec9edec9a2
commit
9aed9debca
|
@ -5,6 +5,15 @@
|
||||||
|
|
||||||
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 {
|
||||||
'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 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.
|
|
@ -1,35 +0,0 @@
|
||||||
<?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 @@
|
||||||
/*
|
/*
|
||||||
* 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 @@
|
||||||
|
|
||||||
'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',
|
||||||
|
|
Loading…
Reference in New Issue