dizon.ben
dizon.ben

Reputation: 37

Syntax Error in Laravel - syntax error, unexpected token \"=\", expecting \"]\"

I'm trying to send a mail through Postman but it sends a 500 error response.

Here's the code in my controller:

Mail::to($user->email_address)->send(new ClientFinalRegistration($user));

It return an error response in Postman.

"error": "syntax error, unexpected token "=", expecting "]""

What does it mean?


EDIT:

Notice the faqURL key. I forgot to put ">" after the equals sign. That's where the problem occurs.

In my Mail/ClientFinalRegistration.php

/**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->subject($this->subject)
            ->markdown($this->view)
            ->with([
                'user' => $this->user,
                'faqURL' = $this->faqURL,
                'url' => $this->url,
            ]);
    }

Upvotes: 0

Views: 836

Answers (1)

devsead
devsead

Reputation: 343

The issue here is inside of the ClientFinalRegistration class. Probably when you were adding subject, body, etc.

Upvotes: 2

Related Questions