My route is:
Route::get('header','HomeController@header')->name('header');
My functionality is:
public function header()
{
$header=ParentCategory::latest()->get();
return view('includes.header',compact('header'));
}
My view foreach loop is here:
@foreach($header as $pc)
<li class=" aligned-left parent dropdown " >
<a href="index7fa3.html?route=product/category&path=18"
class="dropdown-toggle" data-toggle="dropdown">
<span class="menu-title"></span><b class="caret"></b></a>
@endforeach
I don't want to write their route which name is header, mention in browser I want to work my foreach loop without route name, header.
via virtullians