Impment webcron and internal scheduling methods and change settings to a key value store
This commit is contained in:
+12
-2
@@ -9,8 +9,18 @@ class Setting extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $primaryKey = 'key';
|
||||
public $incrementing = false;
|
||||
protected $keyType = 'string';
|
||||
|
||||
protected $fillable = [
|
||||
'invoice_number_format',
|
||||
'invoice_number_start',
|
||||
'key',
|
||||
'value',
|
||||
];
|
||||
|
||||
// Hilfsmethode: alle Einstellungen als key=>value Array
|
||||
public static function allKeyValue(): array
|
||||
{
|
||||
return self::query()->pluck('value', 'key')->toArray();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user