message_id = $message_id; $this->entity = $entity; } /** * Execute the job. * * * @return false */ public function handle() { $invitation = $this->entity::with('user', 'contact') ->whereMessageId($this->message_id) ->first(); if (! $invitation) { return false; } $invitation->opened_date = now(); //$invitation->email_error = $error; $invitation->save(); } }