File manager - Edit - /var/www/html/portal/app/Models/Cultura/Credenciamento/CredenciamentoEvento.php
Back
<?php namespace App\Models\Cultura\Credenciamento; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Str; use DateTimeInterface; class CredenciamentoEvento extends Model { protected $connection = 'mysql'; public $incrementing = false; protected $keyType = 'string'; protected $table = 'credenciamento_eventos'; const CREATED_AT = 'created_at'; const UPDATED_AT = 'updated_at'; protected $fillable = [ 'id', 'nome', 'categoria', 'data', 'observacoes', 'ativo', 'created_at', 'updated_at', ]; protected $casts = [ 'data' => 'date', 'ativo' => 'boolean', ]; public function convocacoes() { return $this->hasMany(ConvocacaoCredenciamento::class, 'evento_id'); } public 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'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings