I need to build just the API of a specific function in this project, and for testing I'm using Insomnia. But when attempting to send the request, the application will throw a MethodNotAllowedHttpException.
I've set up the following route:
Route::post('/backend/users/store', 'ClientUserController@insert')->name('cms.users.store');
In the ClientUserController, I configured the insert method to be allowed as a guest:
$this->middleware('auth', [ 'except' => [ 'insert' ] ]);
Then I just set up the URL in the software and tried sending a request, causing the exception to be thrown.
