Skip to content
This repository has been archived by the owner on Jul 10, 2019. It is now read-only.

Commit

Permalink
Updated README to have information on new methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
ollieread committed Jan 14, 2014
1 parent f6ccb9b commit cd99bc1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@ as a method itself.
Auth::account()->check();
Auth::user()->check();

I found that have to call the user() method on a user type called user() looked messy, so
I have added in a nice get method to wrap around it.

Auth::user()->get();

In the instance where you have a user type that can impersonate another user type, example being
an admin impersonating a user to recreate or check something, I added in an impersonate() method
which simply wraps loginUsingId() on the request user type.

Auth::admin()->impersonate('user', 1, true);

The first argument is the user type, the second is the id of said user, and the third is
whether or not to remember the user, which will default to false, so can be left out
more often than not.

And so on and so forth.

There we go, done! Enjoy yourselves.
Expand Down

0 comments on commit cd99bc1

Please sign in to comment.