PHP code example of mammut-alex / laravel-collection-thanos

1. Go to this page and download the library: Download mammut-alex/laravel-collection-thanos 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/ */

    

mammut-alex / laravel-collection-thanos example snippets


"mammut-alex/laravel-collection-thanos": "^1.0"

    $data = new Collection([1, 2, 3, 4, 5, 6, 7, 8, 9,10]);
    $data->thanos()->all();//[2,4,5,8,10]

    $data = new Collection([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
    $data->thanos(20)->all();//[2,5]