mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-20 17:37:23 +08:00
filament create&edit redirect
This commit is contained in:
+16
-11
@@ -146,7 +146,7 @@ class SearchBox extends NexusModel
|
||||
$table = self::$taxonomies[$torrentField]['table'];
|
||||
return NexusDB::table($table)->where(function (Builder $query) use ($searchBox) {
|
||||
return $query->where('mode', $searchBox->id)->orWhere('mode', 0);
|
||||
})->get();
|
||||
})->orderBy('sort_index')->orderBy('id')->get();
|
||||
}
|
||||
|
||||
public static function listModeOptions(): array
|
||||
@@ -174,17 +174,27 @@ class SearchBox extends NexusModel
|
||||
}
|
||||
}
|
||||
|
||||
public static function isSpecialEnabled(): bool
|
||||
{
|
||||
return Setting::get('main.spsct') == 'yes';
|
||||
}
|
||||
|
||||
public static function getBrowseMode()
|
||||
{
|
||||
return Setting::get('main.browsecat');
|
||||
}
|
||||
|
||||
public static function getSpecialMode()
|
||||
{
|
||||
return Setting::get('main.specialcat');
|
||||
}
|
||||
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
public function taxonomy_source(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(Source::class, 'mode');
|
||||
@@ -220,10 +230,5 @@ class SearchBox extends NexusModel
|
||||
return $this->hasMany(Processing::class, 'mode');
|
||||
}
|
||||
|
||||
public function taxonomies(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(Taxonomy::class, 'mode');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user