2021-05-20 17:14:38 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
2021-05-20 23:30:34 +08:00
|
|
|
class SearchBox extends NexusModel
|
2021-05-20 17:14:38 +08:00
|
|
|
{
|
|
|
|
|
protected $table = 'searchbox';
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'name', 'catsperrow', 'catpadding', 'showsubcat',
|
|
|
|
|
'showsource', 'showmedium', 'showcodec', 'showstandard', 'showprocessing', 'showteam', 'showaudiocodec',
|
|
|
|
|
'custom_fields', 'custom_fields_display_name', 'custom_fields_display'
|
|
|
|
|
];
|
|
|
|
|
|
2021-05-20 23:30:34 +08:00
|
|
|
public function categories(): \Illuminate\Database\Eloquent\Relations\HasMany
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(Category::class, 'mode');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function normal_fields(): \Illuminate\Database\Eloquent\Relations\HasMany
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(SearchBoxField::class, 'searchbox_id');
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-20 17:14:38 +08:00
|
|
|
}
|