dimanche 24 janvier 2016

Getting subdomain within middleware web group in Laravel 5

picked up Laravel 5 some time ago but have never had to use subdomains before.

At the moment I have:

Route::group(['middleware' => ['web']], function () {
    //Login/Logout
    Route::get('/', 'Auth\AuthController@getLogin');
    Route::get('/auth/login', 'Auth\AuthController@getLogin');
    Route::post('/auth/login', 'Auth\AuthController@postLogin');
    Route::get('/logout', 'Auth\AuthController@logout');
});

The thing is, if I want to grab a subdomain (if one exists), I don't then know how to pass it into the '/' route within the Middleware group as well. A lot of the subdomain routing tutorials don't seem to include/reference middleware web. So am I misunderstanding how this works?

I just want to get the subdomain (if exists), and stick it in through so I can recall it in my login view.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1RHfBkN
via IFTTT

Aucun commentaire:

Enregistrer un commentaire