mirror of
https://gh.wpcy.net/https://github.com/aspirepress/AspireCloud.git
synced 2026-07-17 11:37:03 +08:00
* fix: use elvis to defensively cast falsy columns to null * feat: use PluginProps dataclass to validate Plugin::create() * feat: add ThemeProps and use them in Theme::create * feat: add validations to PluginProps/ThemeProps * feat: Repo abstraction over sources (not to be confused with Model/Entity Repositories) * feat: seed AspireUpdate plugin. We are now first-party. --------- Signed-off-by: Chuck Adams <cja987@gmail.com> Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
22 lines
500 B
PHP
22 lines
500 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
abstract class BaseModel extends Model
|
|
{
|
|
// use HasUuids; // can't be undone, so it's better to define on each subclass
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $guarded = []; // everything is fillable by default
|
|
|
|
/**
|
|
* @param array<string, mixed> $attributes
|
|
*/
|
|
protected static function _create(array $attributes = []): static
|
|
{
|
|
return static::query()->create($attributes);
|
|
}
|
|
}
|