0

I have one blade file which prints data from the database.

When someone adds data like below in database then while rendering that page I am facing below issue.

enter image description here

I have added in below text in the comment. [{{ auth()->user()->first_name }}]

enter image description here

My blade file code to print comment

enter image description here

the issue is coming because in a comment there are double curly braces, can someone help me how can I prevent this?

3
  • Does this post help? Commented May 23, 2019 at 9:58
  • No, my code is laravel blade.php file Commented May 23, 2019 at 10:02
  • and if i use {!! !!} this tag then it will execute html tags which i dont want @YomS. Commented May 23, 2019 at 10:03

1 Answer 1

0

To skip Vue from compiling data containing double curly braces ({{some text}}) for an element, you could use v-pre. This will display raw mustache tags :

<span v-pre>[{{ auth()->user()->first_name }}]</span>

More : v-pre

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.