1 | <?php namespace Arcanedev\LaravelAuth\Models; |
||
15 | class PasswordReset extends AbstractModel |
||
16 | { |
||
17 | /* ----------------------------------------------------------------- |
||
18 | | Properties |
||
19 | | ----------------------------------------------------------------- |
||
20 | */ |
||
21 | |||
22 | /** |
||
23 | * The attributes that should be hidden for arrays. |
||
24 | * |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $hidden = ['token']; |
||
28 | |||
29 | /** |
||
30 | * Indicates if the model should be timestamped. |
||
31 | * |
||
32 | * @var bool |
||
33 | */ |
||
34 | public $timestamps = false; |
||
35 | |||
36 | /** |
||
37 | * The attributes that should be mutated to dates. |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $dates = [self::CREATED_AT]; |
||
42 | |||
43 | /* ----------------------------------------------------------------- |
||
44 | | Constructor |
||
45 | | ----------------------------------------------------------------- |
||
46 | */ |
||
47 | |||
48 | /** |
||
49 | * Create a new Eloquent model instance. |
||
50 | * |
||
51 | * @param array $attributes |
||
52 | */ |
||
53 | 6 | public function __construct(array $attributes = []) |
|
60 | |||
61 | /* ----------------------------------------------------------------- |
||
62 | | Relationships |
||
63 | | ----------------------------------------------------------------- |
||
64 | */ |
||
65 | |||
66 | /** |
||
67 | * The user relationship. |
||
68 | * |
||
69 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
70 | */ |
||
71 | 3 | public function user() |
|
75 | |||
76 | /* ----------------------------------------------------------------- |
||
77 | | Getters & Setters |
||
78 | | ----------------------------------------------------------------- |
||
79 | */ |
||
80 | |||
81 | /** |
||
82 | * Get the token repository. |
||
83 | * |
||
84 | * @return \Illuminate\Auth\Passwords\TokenRepositoryInterface |
||
85 | */ |
||
86 | 3 | public static function getTokenRepository() |
|
90 | |||
91 | /* ----------------------------------------------------------------- |
||
92 | | Check Methods |
||
93 | | ----------------------------------------------------------------- |
||
94 | */ |
||
95 | |||
96 | /** |
||
97 | * Check if the password reset was expired. |
||
98 | * |
||
99 | * @return bool |
||
100 | */ |
||
101 | 3 | public function isExpired() |
|
107 | } |
||
108 |