NiceDate::class, ]; protected $fillable = [ 'message', 'to' ]; public function toCustomer() { return $this->belongsTo(Customers::class, 'to'); } public function fromCustomer() { return $this->belongsTo(Customers::class, 'from'); } public static function getMessagesOlderThan(int $days) { return Message::where('updated_at', '<', Carbon::now()->subDays($days)); } public function notifiable() { return $this->morphOne(Notifications::class, 'notifiable'); } }