title: Laravel 4 - How to json_decode a field every time its accessed?
body: <p>We are storing User preferences as JSON. Since our application acts as an API, responses are returned as JSON as well, but the preferences field is returned as a string. I'd like to make sure this portion of the object is always decoded before any response is sent ie</p>
  
  <pre><code>$user-&gt;prefs = json_decode($user-&gt;prefs);
  </code></pre>
  
  <p>But where? Should I look at "overloading" the User index method? Is this more of a before_filter action? What is <em>laravel</em> way of doing this?</p>