title: How can I require authentication in Laravel 5 on a conditional basis?
body: <p>I have an application which uses Laravel 5's out of the box authentication. I need to require authentication on the show method of a controller ONLY when the field called "approved" is equal to 1. </p>
  
  <p>How can I require authentication using middlewares on a conditional basis such that unauthenticated users can access entries whose approved column is equal to 1, but only authenticated users can see entries where approved is equal to 0.</p>
  
  <p>My constructor currently looks like this:</p>
  
  <pre><code>public function __construct(){
      $this-&gt;middleware('auth', ['only' =&gt; ['edit', 'destroy', 'approve', 'markRecovered']]);
  }
  </code></pre>