Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendered variables interpreted as Blade commands #10849

Closed
mradlinski opened this issue Nov 8, 2015 · 2 comments
Closed

Rendered variables interpreted as Blade commands #10849

mradlinski opened this issue Nov 8, 2015 · 2 comments

Comments

@mradlinski
Copy link

I have an extremely simple case - I'm trying to render "@parent" (a string with that content) into a Blade view that extends another view. It seems the input is interpreted as the @parent command instead, and inserts the parent section's contents.

Full code demonstrating the bug, along with a failing unit test, can be found here: https://github.com/mromnia/laravel-bug

To further explain what I'm doing, the parent view (called main) has this section:

@section('content')
This is the parent view.
@show

The child looks like this:

@extends ('main')

@section('content')
@{{ $testInput }}
This is the child view.
@endsection

Everything is fine as long as $testInput is not @parent. If it is, this is what is getting rendered:

This is the parent view.
This is the child view.

Interestingly enough, I couldn't get it to work with @include or any other command.

@GrahamCampbell
Copy link
Member

Thanks, but this is actually a duplicate. :)

@GrahamCampbell
Copy link
Member

#10068

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants