Hi,
I am new to Laravel and I am trying to get my head around routing.
I have set up a controller and a resource in the routes file:
Route::resource('placements', 'PlacementController');
I have this working to query the database and display everything but what I would like to do is manipulate the sidebar menu depending on which view (index, create, show, edit, update, destroy) is loaded.
I have a sidebar.blade.php file that gets included but I can't work out what to use with the IF statement so that it recognises the different RESTful URLs e.g. /placements/1 or placements/1/edit etc.
How do I change this to recognise the id too ?
@if (Request::path() == 'placements')
Thanks
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community