1. Go to this page and download the library: Download jasonej/enhanced-resources library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jasonej / enhanced-resources example snippets
use Illuminate\Http\Resources\Json\JsonResource;
use Jasonej\EnhancedResources\EnhancedResource;
class Resource extends JsonResource
{
use EnhancedResource;
}
use Illuminate\Http\Resources\Json\ResourceCollection;
use Jasonej\EnhancedResources\EnhancedCollection;
class Collection extends ResourceCollection
{
use EnhancedCollection;
}