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