mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
Tweak how console commands are registered.
This commit is contained in:
parent
ec9edec9a2
commit
9aed9debca
@ -5,6 +5,15 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel {
|
||||
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
'App\Console\Commands\InspireCommand',
|
||||
];
|
||||
|
||||
/**
|
||||
* Run the console application.
|
||||
*
|
||||
|
@ -17,7 +17,7 @@ class Kernel extends HttpKernel {
|
||||
'Illuminate\Session\Middleware\ReadSession',
|
||||
'Illuminate\Session\Middleware\WriteSession',
|
||||
'Illuminate\View\Middleware\ShareErrorsFromSession',
|
||||
'App\Http\Middleware\CsrfTokenIsValid',
|
||||
'App\Http\Middleware\VerifyCsrfToken',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,7 @@ use Closure;
|
||||
use Illuminate\Contracts\Routing\Middleware;
|
||||
use Illuminate\Session\TokenMismatchException;
|
||||
|
||||
class CsrfTokenIsValid implements Middleware {
|
||||
class VerifyCsrfToken implements Middleware {
|
||||
|
||||
/**
|
||||
* 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 @@ return [
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
'App\Providers\ArtisanServiceProvider',
|
||||
'App\Providers\EventServiceProvider',
|
||||
'App\Providers\LogServiceProvider',
|
||||
'App\Providers\RouteServiceProvider',
|
||||
|
@ -15,7 +15,6 @@ return [
|
||||
|
||||
'files' => [
|
||||
|
||||
__DIR__.'/../app/Providers/ArtisanServiceProvider.php',
|
||||
__DIR__.'/../app/Providers/EventServiceProvider.php',
|
||||
__DIR__.'/../app/Providers/LogServiceProvider.php',
|
||||
__DIR__.'/../app/Providers/RouteServiceProvider.php',
|
||||
|
Loading…
x
Reference in New Issue
Block a user