title: Navigation Links Admin Panel with Laravel
body: <p>I'm attempting to try and create a sidebar within my dashboard CMS project that I am creating with Laravel with some different links to various pages. Some of these links require the logged in user to have a certain role to see them in the sidebar and even be able to visit them even if they try and access them directly.</p>
  
  <p>I'm trying to figure out the sort of things I should be doing so that they can only see those certain pages based on their role_id and block them from seeing them if they try and visit the page directly.</p>
  
  <p>My initial thought was to just try and put if statements everywhere but that just becomes more of a problem with the more I have different links. </p>
  
  <p>Lets say I have the following roles and id's with those roles.</p>
  
  <pre><code>id - role_name 
  1    basic user
  2    editor
  3    admin
  4    super admin
  </code></pre>
  
  <p>Lets say I also have the following nav structure.</p>
  
  <pre><code>Dashboard
  Category 1
      Link 1 
      Link 2
  Category 2
      Link 3
      Link 4
      Link 5
      Link 6
  Category 3
      Link 7
      Link 8
      Link 9
      Link 10
  </code></pre>
  
  <p>Is there a better way to handle navigation links with requirements of certain role ids than just putting a whole bunch of if statements all over my code?</p>