【发布时间】:2015-07-07 09:26:20
【问题描述】:
我进行了研究,但未能找到如何正确执行此操作的示例。
我需要结合以下内容:
Route::get('self', ['as' => 'self', 'uses' => 'FrontendController@self']);
Route::get('self/{type}', function($type = 'type'){});
【问题讨论】:
-
为什么需要合并它?
-
我想使用一个命名的控制器并且有一个参数。
-
Route::get('self/{type?}', ['as' => 'uses' => 'FrontendController@self']);
标签: laravel laravel-5 laravel-routing