我希望在队列处理后运行一些语句但是块之后的Queue ::没有被执行,任何人都可以帮助我如何在块之后运行Queue ::
<?php
namespace test\Providers;
use Log;
use Queue;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Log::info('log1');
Queue::after(function ($connection, $job, $data) {
Log::info('log2');
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
}
}
示例输出: 在laravel.log中: 只有&#34; log1&#34;打印