Skip to content
Advertisement

Authenticate users from more than two tables in laravel 8 api

As I know Auth::attempt is used to authenticate users from users table, but i want to authenticate another users from students table and teachers from teachers table. How to create multiple authentication for different users? I’m new in laravel api’s

Advertisement

Answer

I think there’s much stuff on the net, but may this could be useful for you: I’ve written medium article about that, (also there’s attached video and working repo).

Please be patient, I just did that 2 years ago for Laravel 5.*, but the main thing is the same for version 8 as well.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement