add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
+6 -7
View File
@@ -2,6 +2,7 @@
namespace App\Models;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Facades\Cache;
@@ -16,7 +17,6 @@ class Setting extends BaseModel
'created_at',
'updated_at',
];
public $timestamps = true;
protected $casts = [
@@ -49,7 +49,7 @@ class Setting extends BaseModel
{
return static::query()->first() ?? static::query()->create([
// set safe defaults if you want
'name' => 'App',
'name' => 'App',
'timezone' => config('app.timezone', 'UTC'),
]);
}
@@ -70,7 +70,6 @@ class Setting extends BaseModel
public static function updateSettings(array $data): bool
{
$settings = static::singleton();
return $settings->fill($data)->save();
}
@@ -105,9 +104,9 @@ class Setting extends BaseModel
public static function rules(bool $updating = false): array
{
return [
'name' => ['nullable', 'string', 'max:255'],
'timezone' => ['nullable', 'string', 'max:80'], // validate against a list if you want
'updated_by' => ['nullable', 'integer'],
'name' => ['nullable', 'string', 'max:255'],
'timezone' => ['nullable', 'string', 'max:80'], // validate against a list if you want
'updated_by'=> ['nullable', 'integer'],
];
}
}
}