File manager - Edit - /var/www/html/portal/app/Models/ParqueTecnologico/Faq.php
Back
<?php namespace App\Models\ParqueTecnologico; use DateTimeInterface; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Str; class Faq extends Model { protected $table = 'parque_tecnologico_faqs'; public $incrementing = false; protected $keyType = 'string'; protected $fillable = [ 'pergunta', 'resposta', 'ordem', 'status', ]; protected $casts = [ 'status' => 'boolean', ]; protected static function boot(): void { parent::boot(); static::creating(function ($model) { if (empty($model->id)) { $model->id = (string) Str::uuid(); } }); } protected function serializeDate(DateTimeInterface $date): string { return $date->format('Y-m-d H:i:s'); } public function scopeAtivas($query) { return $query->where('status', true); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.11 |
proxy
|
phpinfo
|
Settings