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