routes.php文件
我想在API中使用,而且我没有表单来声明该方法。
Route::post('update/{id}','MovieController@updateRecord');
Route::delete('delete/{id}','MovieController@deleteRecord');
答案 0 :(得分:1)
您可以使用Google网上商店中的Postman这是测试API的绝佳工具
答案 1 :(得分:0)
编辑文件app \ Http \ Kernel.php
并评论以下中间件组
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
//\Illuminate\Session\Middleware\StartSession::class,
//\Illuminate\View\Middleware\ShareErrorsFromSession::class,
//\App\Http\Middleware\VerifyCsrfToken::class,
],
'api' => [
'throttle:60,1',
],
];