1
RESTのパッチHTTP動詞に対してlaravel 5.2でメソッドを書き込もうとしていますが、トークンの不一致が表示されています。 、私は、次のしている私のルートでREST APIパッチメソッドlaravelでトークンの不一致を持つURI
class VerifyCsrfToken extends BaseVerifier
{
/**
* The URIs that should be excluded from CSRF verification
*
* @var array
*/
protected $except = ['v0.1/api/mc-api','v0.1/api/mc-api/{mc_api}'];
}
:これは私のVerifyCsrfToken
クラスです
Route::group(array('prefix'=>'v0.1/api'),function(){
Route::resource('mc-api','ApiController');
});
Route::any('v0.1/api/mc-api/*',['nocsrf'=>'true','uses'=>'[email protected]']);
Route::any('v0.1/api/mc-api/*',['nocsrf'=>true,'uses'=>'[email protected]']);
も行います。
Route::any('v0.1/api/mc-api/{mc_api}', '[email protected]pdate');
から
VerifyCsrfToken
$except
配列変更
を投げるのか? – Beginner
はい、まだそれを投げます。 –
あなたの現在のURLは何ですか? – Beginner