title: Dynamically hide certain columns when returning an Eloquent object as JSON?
body: <p>How do dynamically hide certain columns when returning an Eloquent object as JSON? E.g. to hide the 'password' column:</p>
  
  <pre><code>$users = User::all();
  return Response::json($users);
  </code></pre>
  
  <p>I'm aware I can set protected properties in the model (<strong>$hidden</strong> or <strong>$visible</strong>), but how do I set these dynamically? I might want to hide or show different columns in different contexts.</p>