Support the ongoing development of Laravel.io →
Views Blade
Last updated 2 years ago.
0

take out the {{ and }} and make sure the variable name exists and it will work.

Last updated 2 years ago.
0
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
Last updated 2 years ago.
0
@section('menu')
@include($variable)
@stop
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

montes2012 montes2012 Joined 11 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.