App\services\EmailService::markOpened PHP Method

markOpened() public method

public markOpened ( $messageId ) : boolean
$messageId
return boolean
    public function markOpened($messageId)
    {
        /** @var \App\Models\Invitation $invitation */
        $invitation = Invitation::whereMessageId($messageId)->first();
        if (!$invitation) {
            return false;
        }
        $invitation->opened_date = Carbon::now()->toDateTimeString();
        $invitation->save();
        return true;
    }