title: How to pass parameter through href in laravel?
body: <p>I want to pass parameter from href to controller in laravel. Below is the way I am doing this. But it is generating Page Not Found. Kindly someone help me through this.
  Here is my code files:</p>
  
  <p>Route :</p>
  
  <pre><code>    Route::get('projects/showall', 'ProjectsController@showall')-&gt;name('projects.showall');
  </code></pre>
  
  <p>Controller :</p>
  
  <pre><code>public function showall($role){
  
      if($role == 'admin'){
              dump('hello');
      }
      else{
          dump('hello');
      }
  }
  </code></pre>
  
  <p>(blade)view file: </p>
  
  <pre><code>  &lt;a class="dropdown-item" href="{{route('projects.showall',['role'=&gt; 'admin'])}}"&gt; &lt;/i&gt;All Companies&lt;/a&gt;
  </code></pre>