I need to pass the variable to the attached Blade file. I tried to do this in two ways; however, none of them were successful.
Pass the title variable to the included file:
@section('left') @include('modal', ['title' => 'Hello']) @stop
Use @yield and set the section:
@section('left') @include('modal') @section('title') Hello @stop @stop
I am using Laravel 4.2. I do not know that what I am trying to do is possible, but I think it is.
source share