当我运行php artisan队列时:工作我得到无限循环的已发布事件,即App \ Events \ PikirPublished
我无法找到我犯错误的地方。但在我的日志中,我发现这是因为Carbon。
[2017-08-09 14:43:20] local.ERROR: InvalidArgumentException: Unexpected data found. Unexpected data found. The separation symbol could not be found Trailing data in /Users/akmyradov/code/pikirler-desktop/vendor/nesbot/carbon/src/Carbon/Carbon.php:582 Stack trace: #0 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(709): Carbon\Carbon::createFromFormat('Y-m-d H:i:s', 'Sun, 06 Aug 201...') #1 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(122): Illuminate\Database\Eloquent\Model->asDateTime('Sun, 06 Aug 201...') #2 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(84): Illuminate\Database\Eloquent\Model->addDateAttributesToArray(Array) #3 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(900): Illuminate\Database\Eloquent\Model->attributesToArray() #4 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(929): Illuminate\Database\Eloquent\Model->toArray() #5 [internal function]: Illuminate\Database\Eloquent\Model->jsonSerialize() #6 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php(95): json_encode(Array) #7 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php(48): Illuminate\Broadcasting\Broadcasters\RedisBroadcaster->broadcast(Array, 'App\\Events\\Piki...', Array) #8 [internal function]: Illuminate\Broadcasting\BroadcastEvent->handle(Object(Illuminate\Broadcasting\Broadcasters\RedisBroadcaster)) #9 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array) #10 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #11 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) #12 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) #13 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array) #14 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(114): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent)) #15 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent)) #16 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #17 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(42): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Broadcasting\BroadcastEvent), false) #18 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(69): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array) #19 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(317): Illuminate\Queue\Jobs\Job->fire() #20 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(267): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions)) #21 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(113): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions)) #22 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(101): Illuminate\Queue\Worker->daemon('redis', 'default', Object(Illuminate\Queue\WorkerOptions)) #23 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(84): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'default') #24 [internal function]: Illuminate\Queue\Console\WorkCommand->fire() #25 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array) #26 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #27 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) #28 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) #29 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array) #30 /Users/akmyradov/code/pikirler-desktop/vendor/symfony/console/Command/Command.php(264): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #31 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #32 /Users/akmyradov/code/pikirler-desktop/vendor/symfony/console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #33 /Users/akmyradov/code/pikirler-desktop/vendor/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #34 /Users/akmyradov/code/pikirler-desktop/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #35 /Users/akmyradov/code/pikirler-desktop/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #36 /Users/akmyradov/code/pikirler-desktop/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #37 {main}