mirror of
https://gh.wpcy.net/https://github.com/fairpm/aspirecloud.git
synced 2026-06-20 02:22:28 +08:00
28 lines
676 B
PHP
28 lines
676 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Traits\HasFetchMethods;
|
|
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
|
|
|
|
use HasFetchMethods;
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $guarded = []; // everything is fillable by default
|
|
|
|
/**
|
|
* Exists solely because Laravel IDEA can't seem to find create() without this
|
|
*
|
|
* @param array<string, mixed> $attributes
|
|
*/
|
|
public static function create(array $attributes = []): static
|
|
{
|
|
return static::query()->create($attributes);
|
|
}
|
|
}
|