Yogesh Shinde
Yogesh Shinde

Reputation: 393

MethodNotAllowedHttpException in RouteCollection.php line 219 in laravel API's

routes.php

I want to use in API's and I don't have forms to declare the method.

Route::post('update/{id}','MovieController@updateRecord');
Route::delete('delete/{id}','MovieController@deleteRecord');

Upvotes: 2

Views: 295

Answers (2)

Yogesh Shinde
Yogesh Shinde

Reputation: 393

Edit the file app\Http\Kernel.php

And comments the following middlewareGroups

  \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
        //\Illuminate\Session\Middleware\StartSession::class,
        //\Illuminate\View\Middleware\ShareErrorsFromSession::class,
        //\App\Http\Middleware\VerifyCsrfToken::class,
    ],

    'api' => [
        'throttle:60,1',
    ],
];

Upvotes: 0

Mohammad AL-Raoosh
Mohammad AL-Raoosh

Reputation: 731

You can use Postman from google web store it's a great tool to test your API's

Upvotes: 1

Related Questions