Laravel environment with multi login

Asked

Viewed 138 times

0

I have a personal project that I would like to make available to some companies, but each company must have its own login, so the login screen should have the following address: www.projeto.com.br/empresa/login.

That is, what I want is that in the same project, with the same code, I have a login that takes into account the address typed to choose which company the user is logging into. Is it possible to do this? If so, how would I solve the routes?

I’m working with the Laravel 5.4, but as it is still in the definition phase, there is no code made, the version here is the least important.

1 answer

0

Route::group(array('prefix' => 'empresaTal', 'middleware' => 'auth'), function() { 

Route::get('login', array('as' => 'login.empresaTal', 'dashboard\AuthEmpresaTal@login'));

});

I think that’s what you need. Create route groups

  • Route::get('login', array('as' => 'login.empresaTal','uses'. = > 'Dashboard Authempresatal@login'));

  • Good, I was trying for the authenticator of Laravel himself, I think the ideal is to make a proper authenticator. Thanks

Browser other questions tagged

You are not signed in. Login or sign up in order to post.