Total Complexity | 1 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class BlogSetting extends Model |
||
9 | { |
||
10 | use SoftDeletes; |
||
11 | |||
12 | /** |
||
13 | * The database table used by the model. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $table = 'blog_settings'; |
||
18 | |||
19 | /** |
||
20 | * The attributes that are not mass assignable. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $guarded = [ |
||
25 | 'id', |
||
26 | ]; |
||
27 | |||
28 | /** |
||
29 | * Fillable fields for a Profile. |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $fillable = [ |
||
34 | 'name', |
||
35 | 'key', |
||
36 | 'value', |
||
37 | 'active', |
||
38 | ]; |
||
39 | |||
40 | /** |
||
41 | * Typecasting is awesome. |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $casts = [ |
||
46 | 'name' => 'string', |
||
47 | 'key' => 'string', |
||
48 | 'value' => 'string', |
||
49 | 'active' => 'boolean', |
||
50 | ]; |
||
51 | |||
52 | /** |
||
53 | * The attributes that should be mutated to dates. |
||
54 | * |
||
55 | * @var array |
||
56 | */ |
||
57 | protected $dates = [ |
||
58 | 'created_at', |
||
59 | 'updated_at', |
||
60 | 'deleted_at', |
||
61 | ]; |
||
62 | |||
63 | /** |
||
64 | * Scope a query to get the themeId from the settings table. |
||
65 | * |
||
66 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
67 | * |
||
68 | * @return \Illuminate\Database\Eloquent\Builder |
||
69 | */ |
||
70 | public function scopeThemeId($query) |
||
75 |