<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Announcement extends Model { protected $fillable=['title','body','audience','published_by','published_at','expires_at','is_active']; protected function casts():array{return ['published_at'=>'datetime','expires_at'=>'datetime','is_active'=>'boolean'];} }