标签: laravel parameters request
假设我有一条路线:
Route::get('.../{abc}/...', [ 'uses' => 'API\SomeApiController@progress' ]);
SomeApiController::progress()方法将对象ApiRequest作为参数:
SomeApiController::progress()
ApiRequest
public function progress(ApiRequest $request, $abc)
如何在abc方法中获取ApiRequest::authorize()的值?
abc
ApiRequest::authorize()
答案 0 :(得分:1)
在请求对象中,使用route方法:
route
$abc = $this->route('abc');