mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
26 lines
711 B
PHP
26 lines
711 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class SearchBox extends NexusModel
|
|
{
|
|
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'
|
|
];
|
|
|
|
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');
|
|
}
|
|
|
|
}
|