title: Use method controller in if statement while declaring route in Laravel
body: <p>I want to use my show method in controller between if statement while declaring route:</p>
  
  <pre><code>Route::get('/leave', function() {
      if(Auth::user()-&gt;admin)
      {
          'uses' =&gt; 'TimeController@show'
      }
      else {
          return "not found";
      }
  })-&gt;name('admin-time');
  </code></pre>
  
  <p>but the <code>uses</code> that I define it doesn't work! and I know it shouldn't works.</p>