File manager - Edit - /var/www/html/portal/app/Models/Cultura/ArteSacra/Historico.php
Back
<?php namespace App\Models\Cultura\ArteSacra; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Str; use DateTimeInterface; class Historico extends Model { use HasFactory; protected $connection = 'mysql_arte_sacra'; protected $table = 'historico'; public $incrementing = false; protected $keyType = 'string'; protected $fillable = [ 'id', 'acervo_id', 'novo_acervo', 'restauracoes', 'dados_historicos', 'historicos_exposicoes', 'historicos_movimentacoes', 'referencias_bibliograficas', 'observacoes', 'data_realizacao', 'responsavel', 'data_revisao', 'revisor', 'created_at', 'updated_at', ]; protected static function boot() { parent::boot(); static::creating(function ($model) { if (empty($model->id)) { $model->id = (string) Str::uuid(); } }); } protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } public function acervo() { return $this->belongsTo(Acervo::class, 'acervo_id', 'id'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings