Skip to content

Commit 48258b3

Browse files
author
Shawn McCool
committed
added additional auth information
1 parent a7e0eae commit 48258b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

auth/usage.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ Logging a user into your application is simple using the **attempt** method on t
4040

4141
If the user's credentials are valid, the user ID will be stored in the session and the user will be considered "logged in" on subsequent requests to your application.
4242

43-
If you would like to keep a user logged in even after they close their browser, you can pass an optional third parameter of **true** to the **attempt** method.
43+
By default a user's auth session will expire when their browser has been closed. You can enable Laravel's "remember me" functionality by passing **true** as the third parameter to the **attempt** method.
44+
45+
if (Auth::attempt('[email protected]', 'password', true))
46+
...
4447

4548
You probably noticed this method name corresponds to the **attempt** function you [configured earlier](/docs/auth/config#attempt). Each time you call the **attempt** method on the **Auth** class, the **attempt** function in the configuration file will be called to check the user's credentials.
4649

0 commit comments

Comments
 (0)