0
Hi i m laravel fresher so i don't know How to set backend url dynamic

https://sample.com/adminhttps://sample.com/somename

Route::group(['prefix' =>'admin','middleware' => 'Admin_kernal'], function ()

{ //code here } Thanking you.....

4

1 回答 1

1

阅读路由参数。设置路线:

Route::get('{name}', 'SomeController@handle');

并在以下handle()方法中SomeController

public function handle($name) {
    echo $name;
    ....
}
于 2018-01-05T18:19:00.943 回答