Published 2 months ago by mac03733
hi guys. i am new to laravel and i know this is probably a matter of preference.
but i am curious which approach is the best
If you decide to build an extra table for the admins you then have to extend the default auth system which is a lot of extra work considering you could simply have a role and do $user->hasRole('admin') when needed.
Another option if you do not want to use roles nor a flag and need extra columns for your admins is to use a one to one relationship. Your admins table can have the user_id as well as the columns you need without messing with Laravel's auth system.