From cd99bc14cd84d6ad0372993d5f9f632c846fa682 Mon Sep 17 00:00:00 2001 From: Ollie Read Date: Tue, 14 Jan 2014 19:26:41 +0000 Subject: [PATCH] Updated README to have information on new methods. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 0f61dc9..e1dbf8f 100644 --- a/README.md +++ b/README.md @@ -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.