protected function resolveSearchKeywords(string $keyword): array
    {
        $basic = [];
        $advanced = [];

        $tags = \array_map(function ($value) {
            [$tag, ] = \explode(':', $value, 2);

            return "{$tag}:";
        }, \array_keys($this->getSearchableRules()));

        if (\preg_match_all('/([\w]+:\"[\w\s]*\"|[\w]+:[\w\S]+|[\w\S]+)\s?/', $keyword, $keywords)) {
            foreach ($keywords[1] as $index => $keyword) {
                if (! Str::startsWith($keyword, $tags)) {
                    \array_push($basic, $keyword);
                } else {
                    \array_push($advanced, $keyword);
                }
            }
        }

        return [
            'basic' => \implode(' ', $basic),
            'advanced' => $advanced,
        ];
    }
protected function resolveSearchKeywords(string $keyword): array
    {
        $basic = [];
        $advanced = [];

        $tags = \array_map(function ($value) {
            [$tag, ] = \explode(':', $value, 2);

            return "{$tag}:";
        }, \array_keys($this->getSearchableRules()));

        if (\preg_match_all('/([\w]+:\"[\w\s]*\"|[\w]+:[\w\S]+|[\w\S]+)\s?/', $keyword, $keywords)) {
            foreach ($keywords[1] as $index => $keyword) {
                if (! Str::startsWith($keyword, $tags)) {
                    \array_push($basic, $keyword);
                } else {
                    \array_push($advanced, $keyword);
                }
            }
        }

        return [
            'basic' => \implode(' ', $basic),
            'advanced' => $advanced,
        ];
    }
protected function resolveSearchKeywords ( string $ keyword ) : array { $ basic = [ ] ; $ advanced = [ ] ; $ tags = \ array_map ( function ( $ value ) { [ $ tag , ] = \ explode ( ':' , $ value , 2 ) ; return "{$tag}:" ; } , \ array_keys ( $ this -> getSearchableRules ( ) ) ) ; if ( \ preg_match_all ( '/([\w]+:\"[\w\s]*\"|[\w]+:[\w\S]+|[\w\S]+)\s?/' , $ keyword , $ keywords ) ) { foreach ( $ keywords [ 1 ] as $ index => $ keyword ) { if ( ! Str :: startsWith ( $ keyword , $ tags ) ) { \ array_push ( $ basic , $ keyword ) ; } else { \ array_push ( $ advanced , $ keyword ) ; } } } return [ 'basic' => \ implode ( ' ' , $ basic ) , 'advanced' => $ advanced , ] ; }
Resolve search keywords.

@param  string  $keyword

@return array
Resolve search keywords .