时间:2021-07-01 10:21:17 帮助过:32人阅读
Route::get('{model}/lists', function ($model) {
$className = 'App\Http\Controllers\\'.ucfirst($model).'Controller';
$obj = new $className;
return $obj->lists();
});
一个一个写最好;Route::group(['prefix' => 'shop'], function() {
Route::get('list', 'ShopController@list');
})