PHP code example of alphavel / support

1. Go to this page and download the library: Download alphavel/support 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/ */

    

alphavel / support example snippets


use function collect;

$collection = collect([1, 2, 3, 4, 5]);

$result = collect($users)
    ->where('active', true)
    ->sortBy('name')
    ->pluck('email')
    ->unique()
    ->toArray();

// Available methods:
// map, filter, reduce, sum, avg, max, min, count, chunk,
// groupBy, sortBy, pluck, where, first, last, random, etc.