0
@section('title', {{exampleVariable}})

How can I achieve the above?

I've searched around for an answer but haven't found anything relevant.

1
  • 4
    Remove the {{ }}, and make sure to reference the variable correctly, like $exampleVariable Commented Sep 13, 2018 at 20:47

2 Answers 2

1

Just use:

@section('title', $exampleVariable)

instead.

{{ is just use to display variable, consider this as PHP echo method, and here you don't want to just echo variable value

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

Comments

1

You could either do this:

@section('title', $exampleVariable)

Or this:

@section('title')
    {{ $exampleVariable }}
@endsection

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.