You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
571 B
PHP
29 lines
571 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Comunicado extends Model
|
|
{
|
|
protected $fillable = [
|
|
'titulo',
|
|
'activo',
|
|
'fecha_inicio',
|
|
'fecha_fin',
|
|
'url_accion',
|
|
'texto_boton',
|
|
];
|
|
|
|
protected $casts = [
|
|
'activo' => 'boolean',
|
|
'fecha_inicio' => 'date',
|
|
'fecha_fin' => 'date',
|
|
];
|
|
|
|
public function imagenes(): \Illuminate\Database\Eloquent\Relations\HasMany
|
|
{
|
|
return $this->hasMany(ComunicadoImagen::class)->orderBy('orden');
|
|
}
|
|
}
|