Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

001002003's avatar

Unexpected ! is printed out in the view.

Hello, guys. I encountered a problem today. I was testing a new script because I am still learning and made a dummy controller. With this code

$data['welcomeText'] = "New laravel home!";

        return view("index", $data);

End this view

! My first laravel application

{{ $welcomeText }}

And it seems there is a problem with the output. Instead of getting:

New laravel home! I get "! New laravel home!"

I cannot comprehend the error because when I open the view-source: There is no "!". Can you please help me.

P.s I did not format it because the variable and the curly braces do not appear.

0 likes
1 reply
rdelorier's avatar
Level 9

The very first character in the view

Please or to participate in this conversation.