title: Why does class 'Illuminate\Http\Resources\Json\JsonResource' not found in a Lumen project and how can I add JSON Resource in Lumen project?
body: <pre><code>use Illuminate\Http\Resources\Json\ResourceCollection;
  </code></pre>
  
  <p>works and can be retrieved inside a Lumen project. But, using</p>
  
  <blockquote>
  <pre><code>use Illuminate\Http\Resources\Json\JsonResource;
  </code></pre>
  </blockquote>
  
  <p>will return</p>
  
  <blockquote>
    <p>Class 'Illuminate\Http\Resources\Json\JsonResource' not found`</p>
  </blockquote>
  
  <p>So, how can I add <code>JsonResource</code> inside a Lumen project?</p>