status == 1 ? ' Active ' : 'Inactive';
}
// protected function createdBy(): Attribute
// {
// return Attribute::make(
// get: fn ($value) => User::find($value) ? User::find($value)->name : '',
// );
// }
// protected function updatedBy(): Attribute
// {
// return Attribute::make(
// get: fn ($value) => User::find($value) ? User::find($value)->name : '',
// );
// }
public function provinceNews():HasMany{
return $this->hasMany(News::class,'provinces_id','province_id')
->where('status','<>',-1)
->where('news_type_id',2)
->where('newscategories_id',1)
->orderBy('display_order');
}
}