Why would you wanna do that?
If you have another table where you store your users, the easiest would be to just change the table property in your user model.
protected $table = 'customers';
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a Customer model that I want to use as an Authentication system: (Laravel 11) but I get: Illuminate\Auth\SessionGuard::login(): Argument #1 ($user) must be of type Illuminate\Contracts\Auth\Authenticatable, App\Models\Customer given, called in C:\xampp\htdocs\Projects\testproject\app\Http\Controllers\AuthController.php on line 86
Customer model:
@Karim_Taha It's all very simple, a user is a user, and a customer is a user, the user is for authentication, then you have roles to determine what kind of user it is, and what it has access to. The customers table contains customer information about a user, and it has a user_id to determine which user the customer info belongas to.
Don't try to implement different tables to authenticate against, harness the power of the relational database instead.
Please or to participate in this conversation.