标签:laravel
<?php namespace Illuminate\Console; use Illuminate\Support\ServiceProvider; // my name space class ScheduleServiceProvider extends ServiceProvider {// ScheduleService Provider extends ServiceProvider /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true;// deferred is delay for the provider // indicates if loading of the provider is deferred. /** * Register the service provider. * * @return void */ public function register() { $this->commands(‘Illuminate\Console\Scheduling\ScheduleRunCommand‘); }// Register the service provider. // use a api register function ,that is the commands /** * Get the services provided by the provider. * * @return array */ public function provides() { return [ ‘Illuminate\Console\Scheduling\ScheduleRunCommand‘, ]; }// Get the services provided by the provider. // Get a provides instance }
本文出自 “专注php” 博客,请务必保留此出处http://jingshanls.blog.51cto.com/3357095/1765635
每天laravel-20160720|ScheduleServiceProvid
标签:laravel
原文地址:http://jingshanls.blog.51cto.com/3357095/1765635