Support the ongoing development of Laravel.io →
Authentication
Last updated 2 years ago.
0

Out of the box Laravel does not support multiple roles. You could build it yourself, or you could use a package like Sentinel.

0

camroncade is correct,

But, in the auth.php config file.


    /*
    |--------------------------------------------------------------------------
    | Authentication Table
    |--------------------------------------------------------------------------
    |
    | When using the "Database" authentication driver, we need to know which
    | table should be used to retrieve your users. We have chosen a basic
    | default value but you may easily change it to any table you like.
    |
    */

    'table' => 'users',

You can change the table.

I suggest that you look into middleware and routing groups. However, I still agree that using a package is probably easier for you.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.