gam*_*ofe 6 rest post laravel-5.5
我只需要在这个项目中构建一个特定函数的 API,为了测试,我使用了Insomnia。但是当尝试发送请求时,应用程序会抛出一个MethodNotAllowedHttpException.
我已经设置了以下路线:
Route::post('/backend/users/store', 'ClientUserController@insert')->name('cms.users.store');
Run Code Online (Sandbox Code Playgroud)
在 中ClientUserController,我配置了insert允许作为访客的方法:
$this->middleware('auth', [ 'except' => [ 'insert' ] ]);
Run Code Online (Sandbox Code Playgroud)
然后我只是在软件中设置了URL并尝试发送请求,导致抛出异常。
| 归档时间: |
|
| 查看次数: |
1738 次 |
| 最近记录: |