Total Complexity | 2 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class UserSettings extends Model |
||
8 | { |
||
9 | /** |
||
10 | * The table associated with the model. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $table = 'user_settings'; |
||
15 | |||
16 | /** |
||
17 | * The primary key for the model. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $primaryKey = 'user_id'; |
||
22 | |||
23 | /** |
||
24 | * The attributes that are mass assignable. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $fillable = [ |
||
29 | 'user_id', |
||
30 | 'data', |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * The attributes that should be casted to native types. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $casts = [ |
||
39 | 'data' => 'object', |
||
40 | ]; |
||
41 | |||
42 | protected function initTablePrefix() |
||
45 | } |
||
46 | |||
47 | public function user() |
||
52 |