add section taxonomy

This commit is contained in:
xiaomlove
2022-09-07 17:10:52 +08:00
parent 45f467cc75
commit 0b45b1d05f
22 changed files with 484 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ class AudioCodec extends NexusModel
{
protected $table = 'audiocodecs';
protected $fillable = ['name', 'sort_index'];
public static function getLabelName()
{
return nexus_trans('searchbox.sub_category_audio_codec_label');

View File

@@ -7,6 +7,8 @@ class Codec extends NexusModel
{
protected $table = 'codecs';
protected $fillable = ['name', 'sort_index'];
public static function getLabelName()
{
return nexus_trans('searchbox.sub_category_codec_label');

View File

@@ -7,6 +7,8 @@ class Media extends NexusModel
{
protected $table = 'media';
protected $fillable = ['name', 'sort_index'];
public static function getLabelName()
{
return nexus_trans('searchbox.sub_category_media_label');

View File

@@ -7,6 +7,8 @@ class Processing extends NexusModel
{
protected $table = 'processings';
protected $fillable = ['name', 'sort_index'];
public static function getLabelName()
{
return nexus_trans('searchbox.sub_category_processing_label');

View File

@@ -45,6 +45,11 @@ class SearchBox extends NexusModel
return $result;
}
public static function getTaxonomyDisplayText($field)
{
}
protected function customFields(): Attribute
{
return new Attribute(
@@ -73,7 +78,7 @@ class SearchBox extends NexusModel
return $this->hasMany(Source::class, 'mode');
}
public function taxonomy_media(): \Illuminate\Database\Eloquent\Relations\HasMany
public function taxonomy_medium(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany(Media::class, 'mode');
}

View File

@@ -5,6 +5,8 @@ namespace App\Models;
class Source extends NexusModel
{
protected $fillable = ['name', 'sort_index'];
public static function getLabelName()
{
return nexus_trans('searchbox.sub_category_source_label');

View File

@@ -5,6 +5,8 @@ namespace App\Models;
class Standard extends NexusModel
{
protected $fillable = ['name', 'sort_index'];
public static function getLabelName()
{
return nexus_trans('searchbox.sub_category_standard_label');

View File

@@ -5,6 +5,8 @@ namespace App\Models;
class Team extends NexusModel
{
protected $fillable = ['name', 'sort_index'];
public static function getLabelName()
{
return nexus_trans('searchbox.sub_category_team_label');