Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. $result = Auth::attempt(Input::only('email', 'password'));
  2.  
  3. /* @var $app IlluminateFoundationApplication */
  4. $app = App::make("app");
  5.  
  6. /* @var $auth IlluminateAuthAuthManager */
  7. $auth = $app->get("auth");
  8.  
  9. use IlluminateAuthGuard as Auth;
  10.  
  11. public $auth;
  12.  
  13. public function __construct(Auth $auth)
  14. {
  15. $this->auth = $auth;
  16. }
  17.  
  18. public function doSomething()
  19. {
  20. $this->auth->attempt(Input::only('email', 'password'));
  21. }
  22.  
  23. public function __call($method, $parameters)
  24. {
  25. return call_user_func_array(array($this->driver(), $method), $parameters);
  26. }
  27.  
  28. /* @var $manager IlluminateAuthAuthManager */
  29. $manager = $app->get("auth");
  30.  
  31. /* @var $guard IlluminateAuthGuard */
  32. $guard = $manager->driver();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement