首先创建调度任务:php artisan make:command AutoRefund
编辑 app/Console/Commands/AutoRefund.php文件,修改如下几处:
/** * The name and signature of the console command. * * @var string */ protected $signature = 'autorefund'; //任务调度名称 /** * The console command description. * * @var string */ protected $description = 'Command description'; //描述 没有用 /** * Create a new command instance. * * @return void */ public function __construct() { parent::__construct(); } /** * Execute the console command. * * @return mixed */ public fu |