路由代碼:
Route::any('index/test',[
????'user'?=>?'IndexController@test',
????'as'?=>?'test'
]);
控制器代碼:
public?function?test()
{
????return?route('test');
}訪問地址:http://localhost/laravel/public/index/test這樣是可以的:Route::any('index/test','IndexController@test')->name('test');
添加回答
舉報
0/150
提交
取消