Skip to content

Commit 8c580d1

Browse files
committed
You can only pass the ID of a user, not an object.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
1 parent 33b5f63 commit 8c580d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

laravel/documentation/auth/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ To determine if the user of your application is logged in, call the **check** me
5050
return "You're logged in!";
5151
}
5252

53-
Use the **login** method to login a user without checking their credentials, such as after a user first registers to use your application. Just pass your user object or the user's ID:
53+
Use the **login** method to login a user without checking their credentials, such as after a user first registers to use your application. Just pass the user's ID:
5454

55-
Auth::login($user);
55+
Auth::login($user->id);
5656

5757
Auth::login(15);
5858

0 commit comments

Comments
 (0)