mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
filament setting apge
This commit is contained in:
@@ -70,11 +70,17 @@ class HitAndRun extends NexusModel
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function listModes(): array
|
||||
public static function listModes($onlyKeyValue = false): array
|
||||
{
|
||||
$result = self::$modes;
|
||||
$keyValues = [];
|
||||
foreach ($result as $key => &$value) {
|
||||
$value['text'] = nexus_trans('hr.mode_' . $key);
|
||||
$text = nexus_trans('hr.mode_' . $key);
|
||||
$value['text'] = $text;
|
||||
$keyValues[$key] = $text;
|
||||
}
|
||||
if ($onlyKeyValue) {
|
||||
return $keyValues;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,9 @@ use Nexus\Database\NexusDB;
|
||||
|
||||
class Setting extends NexusModel
|
||||
{
|
||||
protected $fillable = ['name', 'value'];
|
||||
protected $fillable = ['name', 'value', 'autoload'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* get setting autoload = yes with cache
|
||||
|
||||
Reference in New Issue
Block a user