123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- return array(
-
- 'user' => function($id)
- {
- if (filter_var($id, FILTER_VALIDATE_INT) !== false)
- {
- return DB::table('users')->find($id);
- }
- },
-
- 'attempt' => function($username, $password)
- {
- $user = DB::table('users')->where_username($username)->first();
- if ( ! is_null($user) and Hash::check($password, $user->password))
- {
- return $user;
- }
- },
-
- 'logout' => function($user) {},
-
- 'cookie' => 'laravel_remember',
- );
|