Stub out some folders for jobs / commands and events.
This commit is contained in:
parent
3cfe2a0c85
commit
dc384fe1f5
|
@ -0,0 +1,7 @@
|
||||||
|
<?php namespace App\Commands;
|
||||||
|
|
||||||
|
abstract class Command {
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
}
|
|
@ -21,22 +21,12 @@ class InspireCommand extends Command {
|
||||||
*/
|
*/
|
||||||
protected $description = 'Display an inspiring quote';
|
protected $description = 'Display an inspiring quote';
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new command instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function fire()
|
public function handle()
|
||||||
{
|
{
|
||||||
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
|
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?php namespace App\Events;
|
||||||
|
|
||||||
|
abstract class Event {
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
}
|
|
@ -1,10 +1,11 @@
|
||||||
<?php namespace App\Http\Controllers;
|
<?php namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Bus\DispatchesCommands;
|
||||||
use Illuminate\Routing\Controller as BaseController;
|
use Illuminate\Routing\Controller as BaseController;
|
||||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||||
|
|
||||||
abstract class Controller extends BaseController {
|
abstract class Controller extends BaseController {
|
||||||
|
|
||||||
use ValidatesRequests;
|
use DispatchesCommands, ValidatesRequests;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Dispatcher;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class BusServiceProvider extends ServiceProvider {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Bus\Dispatcher $dispatcher
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot(Dispatcher $dispatcher)
|
||||||
|
{
|
||||||
|
$dispatcher->mapUsing(function($command)
|
||||||
|
{
|
||||||
|
return Dispatcher::simpleMapping(
|
||||||
|
$command, 'App\Commands', 'App\Handlers\Commands'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -114,6 +114,7 @@
|
||||||
* Application Service Providers...
|
* Application Service Providers...
|
||||||
*/
|
*/
|
||||||
'App\Providers\AppServiceProvider',
|
'App\Providers\AppServiceProvider',
|
||||||
|
'App\Providers\BusServiceProvider',
|
||||||
'App\Providers\EventServiceProvider',
|
'App\Providers\EventServiceProvider',
|
||||||
'App\Providers\RouteServiceProvider',
|
'App\Providers\RouteServiceProvider',
|
||||||
|
|
||||||
|
@ -122,6 +123,7 @@
|
||||||
*/
|
*/
|
||||||
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
|
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
|
||||||
'Illuminate\Auth\AuthServiceProvider',
|
'Illuminate\Auth\AuthServiceProvider',
|
||||||
|
'Illuminate\Bus\BusServiceProvider',
|
||||||
'Illuminate\Cache\CacheServiceProvider',
|
'Illuminate\Cache\CacheServiceProvider',
|
||||||
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
|
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
|
||||||
'Illuminate\Routing\ControllerServiceProvider',
|
'Illuminate\Routing\ControllerServiceProvider',
|
||||||
|
@ -133,6 +135,7 @@
|
||||||
'Illuminate\Hashing\HashServiceProvider',
|
'Illuminate\Hashing\HashServiceProvider',
|
||||||
'Illuminate\Mail\MailServiceProvider',
|
'Illuminate\Mail\MailServiceProvider',
|
||||||
'Illuminate\Pagination\PaginationServiceProvider',
|
'Illuminate\Pagination\PaginationServiceProvider',
|
||||||
|
'Illuminate\Pipeline\PipelineServiceProvider',
|
||||||
'Illuminate\Queue\QueueServiceProvider',
|
'Illuminate\Queue\QueueServiceProvider',
|
||||||
'Illuminate\Redis\RedisServiceProvider',
|
'Illuminate\Redis\RedisServiceProvider',
|
||||||
'Illuminate\Auth\Passwords\PasswordResetServiceProvider',
|
'Illuminate\Auth\Passwords\PasswordResetServiceProvider',
|
||||||
|
@ -143,19 +146,6 @@
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Service Provider Manifest
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The service provider manifest is used by Laravel to lazy load service
|
|
||||||
| providers which are not needed for each request, as well to keep a
|
|
||||||
| list of all of the services. Here, you may set its storage spot.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'manifest' => storage_path().'/framework',
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Class Aliases
|
| Class Aliases
|
||||||
|
|
Loading…
Reference in New Issue