1 | <?php |
||
20 | class Settings extends Model |
||
21 | { |
||
22 | use SoftDeletes, AdminModelTrait; |
||
23 | |||
24 | /** |
||
25 | * Get settings by name |
||
26 | * |
||
27 | * @param $name |
||
28 | * @return |null |
||
|
|||
29 | */ |
||
30 | public static function getByName($name){ |
||
39 | |||
40 | |||
41 | /** |
||
42 | * The database table used by the model. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $table = 'settings'; |
||
47 | |||
48 | /** |
||
49 | * The attributes that should be mutated to dates. |
||
50 | * |
||
51 | * @var array |
||
52 | */ |
||
53 | protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
||
54 | |||
55 | /** |
||
56 | * The attributes that are mass assignable. |
||
57 | * |
||
58 | * @var array |
||
59 | */ |
||
60 | protected $fillable = ['name', 'value', 'description']; |
||
61 | |||
62 | /** |
||
63 | * Columns to exclude from index |
||
64 | * |
||
65 | * @var array |
||
66 | */ |
||
67 | protected $excludedFromIndex = []; |
||
68 | |||
69 | /** |
||
70 | * Fields to search in fulltext mode |
||
71 | * |
||
72 | * @var array |
||
73 | */ |
||
74 | protected $fulltextFields = [ |
||
75 | 'id', |
||
76 | 'name' => [ |
||
77 | 'operator' => 'LIKE', |
||
78 | 'prefix' => '%', |
||
79 | 'sufix' => '%' |
||
80 | ], |
||
81 | 'value' => [ |
||
82 | 'operator' => 'LIKE', |
||
83 | 'prefix' => '%', |
||
84 | 'sufix' => '%' |
||
85 | ], |
||
86 | 'description' => [ |
||
87 | 'operator' => 'LIKE', |
||
88 | 'prefix' => '%', |
||
89 | 'sufix' => '%' |
||
90 | ], |
||
91 | ]; |
||
92 | |||
93 | /** |
||
94 | * Default order by |
||
95 | * |
||
96 | * @var array |
||
97 | */ |
||
98 | protected $defaultOrderBy = [ |
||
99 | 'name' => 'asc' |
||
100 | ]; |
||
101 | |||
102 | } |
||
103 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.