title: Helper VS Library in Laravel?
body: <p>I have controller <code>Cars</code>. Lets call this entity Cars.</p>
  
  <p>Each car has type: <code>0 =&gt; car, 1 =&gt; truck</code> etc.</p>
  
  <p>The model <code>Car</code> contents fields:</p>
  
  <pre><code>id | type | engine
  1      1      2
  </code></pre>
  
  <p>So, from this table I know that car is truck by <code>type</code> field.</p>
  
  <p>When I get all rows from table Cars:</p>
  
  <pre><code>$cars = Cars:all();
  </code></pre>
  
  <p>I take field type in format integer, but I need to get string, instead 1 I sholud get <code>Truck</code>.</p>
  
  <p>I have some ways to do that:</p>
  
  <ul>
  <li>Use  <code>with()</code> and connect table car with table type_car</li>
  <li>Use Helper Class, which gets all type_Car in array, after returns item by key in array</li>
  <li>Use Library in Laravel that the same as Helper</li>
  </ul>
  
  <p>What do you recommend me to use?</p>