How to deal with multiple logins in Laravel? [duplicate]

-2

In my application I have 3 distinct areas:

Admin

  

Where everything is managed, authentication is currently done by Sentry (very good by the way). For this area I have the Users model that communicates with the database.

Students

  

Where the student has access to a wide range of data and tools.

Responsible

  

Where the student in charge comes in to manage their payments and data.

Each of them has its own model / table and format

I really can not figure out how to solve this problem.

    
asked by anonymous 14.01.2014 / 20:48

1 answer

4

The most practical method is to configure authentication on the route where it is needed:

Config::set('auth.model', 'Admin');

Or, set to a standard URI's

if ($request->is('admin*'))
{
    Config::set('auth.model', 'Admin');
}

In this way, Model Admin will be responsible for authentication.

P.S. I replied with the same response from Authentication with two different tables and I am voting as a duplicate .

    
14.01.2014 / 20:50