1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace App\Models; |
||
6 | |||
7 | use Carbon\Carbon; |
||
8 | use Illuminate\Database\Eloquent\Model; |
||
9 | |||
10 | final class Dispense extends Model |
||
11 | { |
||
12 | protected $fillable = [ |
||
13 | 'key', 'token', 'expires_at', |
||
14 | ]; |
||
15 | |||
16 | protected $dates = [ |
||
17 | 'expires_at', |
||
18 | ]; |
||
19 | |||
20 | public function getExpiresAt(): Carbon |
||
21 | { |
||
22 | return $this->getAttributeValue('expires_at'); |
||
23 | } |
||
24 | |||
25 | public function getToken(): string |
||
26 | { |
||
27 | return $this->getAttributeValue('token'); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
28 | } |
||
29 | } |
||
30 |