blade icon indicating copy to clipboard operation
blade copied to clipboard

Bound data / view variables

Open AppSynergy opened this issue 8 years ago • 0 comments

Hi,

I'm trying to include data with my templates. Both of these render nothing for {{ $title }}:

@include('partials/sighting-top', array('title' => 'My Title'))       // usual way
@include('partials/sighting-top')->with('title','My Title')            // should work to?

So I look at this: blade.php#L332-L337

and wonder about ->with(get_defined_vars()).

Doesn't this just rewrite my $title to null, since no value is supplied?

view.php#L452-L463

AppSynergy avatar Apr 07 '16 10:04 AppSynergy