This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace common\helpers; | |
class ArrayHelper extends \yii\helpers\ArrayHelper | |
{ | |
public static function multiSearch($needle, $haystack, $options = ['strict' => false, 'yiiFormat' => false]) | |
{ | |
$iterator = new \RecursiveIteratorIterator(new \RecursiveArrayIterator([$haystack])); | |
// parent array is skipped in subiterators, so we wrap the argument in one more array | |
$results = []; |