I'm viewing table of users from MySQL database using laravel,andhow there is edit column and I need to use the $id parameter to redirect the user to another page and view the user details. this is my route and it's working fine.
<td>
<a href="{{ URL::to('userdetails',$user->id) }}"</a>
Edit
</td>
but after going to this page that view user detials. my navigation bar url's start behaving weird.
when I view the users list my URL is
/osama/warehouse/public/index.php/userslist
when I view a specific users with an id the url is
/osama/warehouse/public/index.php/userdetails/1
until all good, but after that when I click on my home button on my navigation bar or other links I get an error because the URL not correct
/osama/warehouse/public/index.php/userdetails/home !!!
the right URL should be
/osama/warehouse/public/index.php/home
note I'm not using blade route or html url for my navigation bar,just pure HTML.the reason is I got css classes that I can't include in the html link.
<a <?php if ($_SESSION['navbar']=="dashboard"){echo 'class="active"';}?> href="home"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
– Osama Al-Banna