I have developed my first Laravel CRUD application and i am looking to setup a system of authentication. I have two groups of users:
Employees who will have different permissions or privileges on specific tables. Create orders, add products...etc...
Customers who will login and view invoices.
I am still learning Laravel and I am somewhat confused about the differences between using the mysql native user table vs using the built in Laravel Users table.
Can Laraval or a Laravel package do what I can do within Mysql with the user table.. ie grant privileges on tables, Only allow connections from a certain IP ? What would be the best strategy to handle the above groups ? i am using Laravel 5.2
Thanks...
users you are authenticating does not need to reside in the user table, meaning you can name the user table anything. On Laravel 5.2 and up it even supports multiple tables.
To set a different model to be authenticated, see the config/auth.php you need to set the model class there, if you're using the eloquent driver. Your model must extend Illuminate\Foundation\Auth\User
see this on how to do a multi model auth http://stackoverflow.com/questions/34490600/how-to-use-multi-auth-in-laravel-5-2
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community