Total Complexity | 2 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class AuthenticationLog extends Model |
||
8 | { |
||
9 | /** |
||
10 | * The table associated with the model. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | public function __construct(array $attributes = []) |
||
15 | { |
||
16 | parent::__construct($attributes); |
||
17 | $this->table = config('authentication-log.table_name'); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Indicates if the model should be timestamped. |
||
22 | * |
||
23 | * @var bool |
||
24 | */ |
||
25 | public $timestamps = false; |
||
26 | |||
27 | /** |
||
28 | * The attributes that aren't mass assignable. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $guarded = ['auth_id', 'auth_type']; |
||
33 | |||
34 | /** |
||
35 | * The attributes that should be cast to native types. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $casts = [ |
||
40 | 'login_at' => 'datetime', |
||
41 | 'logout_at' => 'datetime', |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * Get the authenticatable entity that the authentication log belongs to. |
||
46 | */ |
||
47 | public function authenticatable() |
||
50 | } |
||
51 | } |
||
52 |