26 lines
737 B
Plaintext
26 lines
737 B
Plaintext
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Rsgrinko\Proton\Database\Model\Model;
|
|
|
|
/**
|
|
* {{class}}.
|
|
*/
|
|
final class {{class}} extends Model
|
|
{
|
|
protected static string $table = '{{table}}';
|
|
|
|
/**
|
|
* Что можно заполнять массово через new/create()/fill()/update(): остальное
|
|
* ставит код (forceFill), а не форма. Пусто — не заполняется ничего:
|
|
* перечислите поля, иначе Model::create(['title' => …]) сохранит пустую строку
|
|
*/
|
|
protected array $fillable = [];
|
|
|
|
/** Приведение типов: int, float, bool, json, datetime */
|
|
protected array $casts = [];
|
|
}
|