简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM