laravel get subdomain

Solutions on MaxInterview for laravel get subdomain by the best coders in the world

showing results for - "laravel get subdomain"
Roberto
06 Nov 2018
1Route::group(array('domain' => '{subdomain}.project.dev'), function() {
2
3    Route::get('foo', function($subdomain) {
4        // Here I can access $subdomain
5    });
6
7    $subdomain = Route::input('subdomain');
8
9});
10