Remove 'namespace' => 'App' unless you've actually put the controller in the root of the app folder.
Dec 2, 2018
8
Level 7
Existing route returns 404
I've been debugging an apparently easy problem, but I can't find out what's happening and it's driving me crazy.
I have this route set up:
Route::group(['middleware' => ['auth'], 'namespace' => 'App', 'as' => 'app.'], function () {
//
Route::post('/record/store', 'RecordController@store')->name('record.store');
//
But when I hit this endpoint with my post form it returns 404:
<form role="form" action="{{ route('app.record.store') }}" method="post">
@csrf
//
- There are no other routes with the same name or sharing endpoint.
- There's only auth middleware and I'm authenticated.
-
php artisan route:listshows it correctly. - I cleared cache just in case:
php artisan route:clear
Please or to participate in this conversation.