I am developing an api json. I'm finding that I miss the following error:
MethodNotAllowedHttpException
I have executed the php artisan route:list
and the routes are well defined. The problem I find that the update
and the delete
do not work correctly.
The route is defined as web.php
:
Route::resource("perros","PerrosController");
Requests with postman, I am sending them with id
in the case of delete
and with data and id in the case of update
.
I have commented the csrfTocken
:
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
//\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'throttle:60,1',
'bindings',
],
];