12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- return array(
-
- 'user' => function($id)
- {
- if ( ! is_null($id)) return User::find($id);
- },
-
- 'attempt' => function($username, $password)
- {
- if ( ! is_null($user = User::where('email', '=', $username)->first()))
- {
- if (Hasher::check($password, $user->password)) return $user;
- }
- },
-
- 'logout' => function($user) {}
- );
|