zaster

Including Routes with a variable {id} to a menu

Posted 4 months ago by zaster

I have a sidebar and all the menus looks like

<li><a href="{{route('employee.job.create')}}"><i class="fa fa-link"></i> <span>Add Job</span></a></li>

<li><a href="{{route('employee.quotation.create')}}"><i class="fa fa-link"></i> <span>Add Quotation</span></a></li>

etc...

How can i represent something like

<li><a href="{{route('vendor.profile.edit', $vendor_company->id)}}"><i class="fa fa-link"></i> <span>Profile</span></a></li>

There should be a way of passing the $vendor_company->id in an easy way

Or should i pass $vendor_company through each and every controller ?

Please sign in or create an account to participate in this conversation.