Anna Jeanine
Anna Jeanine

Reputation: 4125

Render HTML tags from Exception Laravel

I'm trying to render a pretty list in a Laravel Exception. The code which I have:

if (count($notValidatedProducts) !== 0) {
    throw new Exception('Could not create invoice. \n<br> test');
}

I tried the \n and <br> but non are working in the view. I can't find any documentation if this is even possible.

Upvotes: 1

Views: 69

Answers (1)

Moubarak Hayal
Moubarak Hayal

Reputation: 209

well if you are asking about how you can make a new line input \n or <br>

you can try this :

if (count($notValidatedProducts) !== 0) {
throw new Exception('Could not create invoice.'."\r\n".'test');

}

good luck

Upvotes: 2

Related Questions