Skip to content

Commit

Permalink
Add information for a setup with multiple guards (#1680)
Browse files Browse the repository at this point in the history
* Add information for a setup with multiple guards

It is possible in laravel to specify multiple guards, the docs should reflect how to specify the guard type if the api guard is not set as the default.

* Decrease title size
  • Loading branch information
Christophvh authored and tymondesigns committed Dec 8, 2018
1 parent 689fcc2 commit ef07317
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/auth-guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

The following methods are available on the Auth guard instance.

### Multiple Guards

If the newly created 'api' guard is not set as a default guard or you have defined multiple guards to handle authentication,
you should specify the guard when calling auth().

```php
$token = auth('api')->attempt($credentials);
```

### attempt()

Attempt to authenticate a user via some credentials.
Expand Down

0 comments on commit ef07317

Please sign in to comment.