<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class News extends Model {
    protected $fillable=['organization_id','user_id','title','slug','excerpt','content','featured_image','category','status','public_visible','aggregate_to_main','published_at','views'];
    protected $casts=['published_at'=>'datetime','public_visible'=>'boolean','aggregate_to_main'=>'boolean'];
    public function organization(){ return $this->belongsTo(Organization::class); }
    public function user(){ return $this->belongsTo(User::class); }
}
