Answer the question
In order to leave comments, you need to log in
Routing not working as expected in Laravel?
Hello, I can’t understand how routing works in Laravel (latest version 8, maybe in other versions as well).
Route::prefix('admin')->name('admin.')->middleware('auth')->group(function()
{
/* admin home page */
Route::get('/', [\App\Http\Controllers\Admin\Pages\Index::class, 'list'])->name('home');
});
Route::group(['prefix' => '{language}'], function() {
Auth::routes();
Route::get('/{slug?}', [\App\Http\Controllers\Page::class, 'index'])->name('page');
});
Missing required parameters for [Route: page] [URI: {language}/{slug?}]
Answer the question
In order to leave comments, you need to log in
But why is the superior admin ignored, and how to get around this.Because he is superior. It's easy to get around - make it downstream.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question