第一條路線
Route::get('/', [HomeController::class, 'method'])->name('home.index');
第二條路線
Route::get('/{slug}', [Controller::class, 'method'])->name('view');
第三條路線
Route::get('/dashboard', [HomeController::class, 'method'])->name('home');
如何在沒有任何錯誤的情況下呼叫路由?
uj5u.com熱心網友回復:
只需更改路線順序
Route::get('/dashboard', [HomeController::class, 'method'])->name('home');
Route::get('/{slug}', [Controller::class, 'method'])->name('view');
uj5u.com熱心網友回復:
所以你必須訂購這樣的東西,
Route::get('/', [HomeController::class, 'method'])->name('home.index');
Route::get('/dashboard', [HomeController::class, 'method'])->name('home');
Route::get('/{slug}', [Controller::class, 'method'])->name('view');
讓我知道結果。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/391961.html
標籤:拉拉维尔
