user1136994
user1136994

Reputation: 187

Laravel Blade double brackets and templates not working but php echo does

This works fine using php echo

    <!-- app/views/example.blade.php -->

    <p><?php echo $taylorTheVampireSlayer; ?></p>

The below code out puts the double brackets.

Seems like the blade templating system isn' working on my localhost/lampstack.

I have checked all permissions and tried the original code to

   <!-- app/views/example.blade.php -->


   <p>{{ $taylorTheVampireSlayer }}</p>

Upvotes: 4

Views: 1434

Answers (2)

Vianney
Vianney

Reputation: 31

I had the same issue and it has been solved by changing the name of the views by adding " .blade " between "name" and ".php" like Eluong said.

name.php : issues name.blade.php : solved

Upvotes: 2

Ajay Kumar Ganesh
Ajay Kumar Ganesh

Reputation: 1852

Try using these!

Blade::setContentTags('{{', '}}');      // for variables and all things Blade    
Blade::setEscapedContentTags('{{{', '}}}');     // for escaped data

Hope this helps! happy larveling :)

Upvotes: 3

Related Questions