0

It might be a bit over engineering, but so far I can't come up with any other solution. I retrieve a model via axios. The model has a title (English) and may have (or may NOT) its own localized alternative title. The code below is working, but it prepends the localized title with '@' for some reason. So my question is how will I get rid of this '@'?

<label>
<span v-if="(ques.questionLocalized && ques.questionLocalized.{{\App::getLocale()}})">
@{{ques.questionLocalized.<?php echo \App::getLocale();?>}}
</span>  
<span v-else>@{{ques.question}}</span>
<small>({{__('ux.required')}})</small><span class="req">*</span>
</label>

enter image description hereenter image description here

3
  • are your views using .blade or .vue? Commented Dec 14, 2018 at 5:45
  • its laravel's blade Commented Dec 14, 2018 at 5:53
  • what happens if you remove @? Commented Dec 14, 2018 at 5:55

1 Answer 1

1

try using the @verbatim directive:

@verbatim
<label>
   <span v-if="(ques.questionLocalized && ques.questionLocalized. 
      {{\App::getLocale()}})">
      {{ques.questionLocalized.<?php echo \App::getLocale();?>}}
   </span>  
   <span v-else>{{ques.question}}</span>
   <small>({{__('ux.required')}})</small><span class="req">*</span>
</label>
@endverbatim

you may wrap the HTML in the @verbatim directive so that you do not have to prefix each Blade echo statement with an @ symbol

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.