【发布时间】:2017-06-26 14:36:41
【问题描述】:
[InvalidArgumentException]无效的预定回调事件。必须是字符串或可调用的。 这是代码
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
$schedule->call($this->consult());
}
/**
* Register the Closure based commands for the application.
*
* @return void
*/
protected function consult()
{//try {
$url=DB::table('remote_services')->pluck('url');
foreach ($url as $url){
echo $url;
echo ' ';}
//}catch (InvalidArgumentException $e ){
// echo 'captured exception';
}
【问题讨论】:
-
为您提供了错误的行号,以及堆栈跟踪。两者在帮助调试代码方面都非常有用。
标签: php database laravel laravel-5.4