title: Converting CSV to JSON using PHP
body: <p>I am writing a Lumen app and have a CSV file that I need to convert to JSON.</p>
  
  <pre><code>"ALL","13","5","4","4", "TEST01","3","1","0","2", 
  </code></pre>
  
  <p>I want to convert it to a JSON file like so. </p>
  
  <pre><code>{
      "ALL": {
          "Total": 13,
          "In Use":5,
          "Available": 4,
          "Asleep": 4
       },
       "TEST01": {
          "Total": 3,
          "In Use":1,
          "Available": 0,
          "Asleep": 2
       }
  }
  </code></pre>
  
  <p>How could I go about doing this using PHP or a Laravel/Lumen native way?</p>