動(dòng)態(tài)匹配所有
Route::group([], function () {
Route::any('/{controller?}/{action?}', function($controller='', $action=''){
if (empty($controller)) {
return 'welcome!';
}else {
$controller = "App\\Http\\Controllers\\".ucfirst($controller).'Controller';
return App::make($controller)->$action();
}
});
});