1. Go to this page and download the library: Download ehsanmoradi/data-mapper 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/ */
use EhsanMoradi\DataMapper\Mapper;
use Illuminate\Support\Facades\Http;
$data = Http::get('/api/json')->body();
$mapper = new Mapper($data);
// or
$mapper = new Mapper($data, config('data-mapper.nested'));
dd([
$mapper->name(),
$mapper->family(),
$mapper->birthdayDate(),
]);