title: Converting float value to 2 decimal places in Laravel
body: <p>I have a field on my database called <code>productivity</code>(float) which divides <code>work_time</code>(float) by <code>total_time</code>(float). it work but the output shows up like 0.727273 instead of 0.72. Is there a way in Laravel to fix this?</p>
  <p>my controller:</p>
  <pre><code>$energy-&gt;productivity = $request-&gt;input('work_time') / ($request-&gt;input('admin_time') + $request-&gt;input('driving_time') + $request-&gt;input('work_time'));:
  </code></pre>
  <p>my view:</p>
  <pre><code> &lt;td&gt;{{$data-&gt;productivity}}&lt;/td&gt;
  </code></pre>