0
経路の引数は2つを渡したいが、1つのみを引数として渡したい。 以下は私のコードです。例について複数の場所を経路に渡す方法Laravel 5.4
Route::group(['domain' => '{subdomain}'.'.example.com'], function() {
// Here goes all your subdomain handling
// Then handle subdomain requests that where not found
Route::get('{slug}', function($subdomain, $slug) {
return redirect(\URL::to('http://example.com/'.$slug));
})->where('slug', 'admin')->where('slug', 'distributor');
});
:
www.ez.example.com/distributor
リダイレクト
しかしadmin
www.example.com/distributor
には、それだけ分配のために働いている
が動作していません。
ありがとうございます。出来た。 @ロス – mayur