Support the ongoing development of Laravel.io →
Authentication Jetstream

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 ~

Last updated 1 year ago.
0

carlx1101 liked this reply

1

I do tried this solution before, not sure if you encountered similar problems, the solutions have plenty of bugs and error

0
Solution

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

kepsondiaz, carlx1101 liked this reply

2
Solution selected by @carlx1101

Sign in to participate in this thread!

Eventy

Your banner here too?

YIP KAR FAI carlx1101 Joined 19 Jul 2022

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.