To authenticate a user using their database record's primary key, you may use the loginUsingId
method. This method accepts the primary key of the user you wish to authenticate:
Auth::loginUsingId(1);
https://laravel.com/docs/11.x/authentication#authenticate-a-user-by-id