Hi i have some problems with jetstream with multiple auth, i flw this tutorial https://medium.com/@mursaleen5959/laravel-10-multiauth-with-jetstream-and-livewire-ca4ed7c0a702, everything works for both user and admin login except
After logged as admin > profile, it will revert me to user login page 1a. the user>profile works perfectly
Enabling the teams feature from jetstream will give me these error ( only logged in as admin ) App\Policies\TeamPolicy::create(): Argument #1 ($user) must be of type App\Models\User, App\Models\Admin given, called in C:\FYP\codespace\vendor\laravel\framework\src\Illuminate\Auth\Access\Gate.php on line 811
Do feel free to share any available resource related about multi auth in jetstream as well, thanks ~
hello you can chek this article : https://www.laravel-tips.com/laravel-multi-authentication-with-jetstream
I do tried this solution before, not sure if you encountered similar problems, the solutions have plenty of bugs and error
Hello @carlx1101 ,
I have a question for you. Why you want to use different tables for storing your users?
You can use a single table and can make use of roles and permissions to control your application. Here is a well known package from Spatie named Laravel-permission
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community