1. Go to this page and download the library: Download yaknet/mock-engine 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/ */
$grouped = QueryBuilder::from($users)
->groupBy('profile.city')
->get();
// Get the average age of users in Istanbul
$istanbulUsers = $grouped['Istanbul']; // This is a Collection!
$averageAge = $istanbulUsers->avg('age');
$maxAge = $istanbulUsers->max('age');
$names = $istanbulUsers->pluck('name'); // ['John Doe', ...]
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.