0
具有下一個路線:如何在路由時區分參數與聲明的路由?
Route::get('/apartment/{apartment_name}', '[email protected]');
Route::get('/apartment/create', [
'uses' => '[email protected]',
'as' => 'apartment.create'
]);
Route::get('/apartment/edit', [
'uses' => '[email protected]',
'as' => 'apartment.edit',
]);
我如何才能讓路由 myapp.com/apartment/create和myapp.com/apartment/beach-apartment之間的差異
我想通過公寓的名稱搜索相同的URI前綴(公寓/),但與此代碼我總是調用參數路由。