take out the {{ and }} and make sure the variable name exists and it will work.
public function summary ($id)
{
$valor = 'menu.menuSuperA';
return View::make('repeaters.summary',compact('valor');
}
view summary.blade
@section('menu')
@include({{ valor }})
@stop
I get in the browser syntax error, unexpected '<', expecting ')'
the correct form is:
@section('menu')
@include('menu.menuSuperA')
@stop
@section('menu')
@include($variable)
@stop
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community