actor; $actor->assertRegistered(); $notification = Notification::where('user_id', $actor->id)->findOrFail($command->notificationId); Notification::where([ 'user_id' => $actor->id, 'type' => $notification->type, 'subject_id' => $notification->subject_id ]) ->update(['read_at' => Carbon::now()]); $notification->read_at = Carbon::now(); return $notification; } }