Isaque Palmieri :
I have a system in Laravel and when I am in the view I build the template with links, I need to insert a route dynamically like this:
<ul class="breadcrumbs pull-left">
<li><a href="{{route('home')}}">Home</a></li>
<li><a href="{{route('$route.index')}}">{{$title}}</a></li>
<li><span>{{$activeList}}</span></li>
</ul>
how to read blade variable within the route function?
this dont work:
{{route('$route.index')}}
error: "Route [$active.index] not defined. (View: C:\xampp\htdocs\systemass\resources\views\templates\srtdash\inc\pagearea.blade.php) (View: C:\xampp\htdocs\systemass\resources\views\templates\srtdash\inc\pagearea.blade.php) (View: C:\xampp\htdocs\systemass\resources\views\templates\srtdash\inc\pagearea.blade.php
N69S :
just use the variable content instead
<ul class="breadcrumbs pull-left">
<li><a href="{{route('home')}}">Home</a></li>
<li><a href="{{route($active.'.index')}}">{{$title}}</a></li>
<li><span>{{$activeList}}</span></li>
</ul>