Laravel subdomains routing and session management -


i trying set isolated backend , frontend environments in same laravel5 application.

my ideal purpose such isolation thru

  • subdomains
  • different guards(tables) users @ front , users @ backend

up i've defined guard/providers @ config/auth.php , done :

routing

    route::group(['domain' => 'front.mydomain.com'], function () {         route::get('/', 'welcomecontroller@index');          route::group(['middleware' => ['web']], function () {                 route::auth();         });           route::group(['middleware' => ['web','auth']], function () {                 route::get('/home', 'homecontroller@index');                  route::group(['prefix' => 'record'], function () {                         route::get('all','recordcontroller@all');                 });         });      });  route::group(['domain' => 'admin.mydomain.com'], function () {         route::get('/', 'welcomecontroller@index');          route::group(['middleware' => ['web']], function () {                 //solo rutas de pantallas de login                 route::get('/password/reset', function() {                          return response::view('errors.404', array(), 404);                 });                      route::auth();         });          route::group(['middleware' => ['web','auth:admin']], function () {                 route::get('/home', function() {                         return  view('admin.dashboard');                 });                  route::group(['prefix' => 'record'], function () {                         route::get('all', 'recordcontroller@all');                         route::get('edit/{id}', 'recordcontroller@edit')->where('id','[0-9]+');                 });         }); }); 

config/session (extract)

'domain' => '.urbina.biz', 

i expecting errors because haven't yet implemented model/tables admin part, redirection loops , apparently because cookie not isolating subdomains, looks it's mixing :(

some 1 may ?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -