update(['is_read' => self::READ]); } public function mark_all_as_read() { Notification::where('is_read', self::UNREAD)->where('entity_type', User::class)->update(['is_read' => self::READ]); } public function formatCreatedAt(): Attribute { return Attribute::make(get: function () { return Carbon::parse($this->created_at)->locale('id')->translatedFormat('d F Y H:i:s'); }); } }