从 laravel 8 api 中的两个以上的表中验证用户

Authenticate users from more than two tables in laravel 8 api

据我所知,Auth::attempt 用于验证来自用户 table 的用户,但我想验证来自学生 table 的另一个用户和来自教师 table 的教师。如何为不同的用户创建多重身份验证?我是 laravel api 的

的新人

我觉得网上有很多东西,但也许这对你有用: 我写了中 article about that, (also there's attached video and working repo).

请耐心等待,我是 2 年前为 Laravel 5.* 做的,但主要内容对于版本 8 也是相同的。