我不想用数据库保存来阻止客户端,所以我想做一些类似于Laravel 4, see below但只在一个特定控制器上显示的内容。
App::shutdown(function($request, $response)
{
// after response to client
App\SearchLog::create($request->all());
});
答案 0 :(得分:1)
您可以使用此代码:
Route::getCurrentRoute()->getActionName()
用于检查在" App :: shutdown"。
中执行的控制器