So I'm trying to learn Laravel and Inertia at the same time so please forgive any apparent ignorance.
For my routes, I'm trying to set up a group with a prefix and a name. This is my code
Route::prefix('narthex')->name('narthex')->group(function () {
Route::get('/', [PagesController::class, 'index'])->name('entry');
Route::get('/contact', [PagesController::class, 'contact'])->name('contact');
});
And here is the code in my react component
href={route('narthex.contact')}
href={route('narthex.entry')}
The problem I'm experiencing is that when I load the page, I'm seeing the following exception:
Uncaught Error: Ziggy error: route 'narthex.entry' is not in the route list.
But according to the documentation on the routing page, the way I have it configured should be working.
When I run Ziggy.routes in the console, I see that the routes above are referenced as narthexentry and narthexcontact (without the . between). Why would those route names not be coming through using the Laravel paradigm where the names are separated with the dot?
What am I doing wrong? Any help would be greatly appreciated. Thanks!
Christoph