src/NodeRepository.php
public function getSearchNodeBuilder($keywords, $type = null, $limit = null, $locale = null)
    {
        // Because of the searchable trait we have to reset global scopes
        $builder = PublishedNode::withoutGlobalScopes()
            ->published()
            ->typeMailing()
            ->translatedIn($locale)
            ->groupBy('nodes.id');

        if ($type)
        {
            $builder->withType($type);
        }

        if ($limit)
        {
            $builder->limit($limit);
        }

        $builder->search($keywords, 20, true);

        return $builder;
    }
public function getSearchNodeBuilder($keywords, $type = null, $limit = null, $locale = null)
    {
        // Because of the searchable trait we have to reset global scopes
        $builder = PublishedNode::withoutGlobalScopes()
            ->published()
            ->typeMailing()
            ->translatedIn($locale)
            ->groupBy('nodes.id');

        if ($type)
        {
            $builder->withType($type);
        }

        if ($limit)
        {
            $builder->limit($limit);
        }

        $builder->search($keywords, 20, true);

        return $builder;
    }
public function getSearchNodeBuilder ( $ keywords , $ type = null , $ limit = null , $ locale = null ) { // Because of the searchable trait we have to reset global scopes $ builder = PublishedNode :: withoutGlobalScopes ( ) -> published ( ) -> typeMailing ( ) -> translatedIn ( $ locale ) -> groupBy ( 'nodes.id' ) ; if ( $ type ) { $ builder -> withType ( $ type ) ; } if ( $ limit ) { $ builder -> limit ( $ limit ) ; } $ builder -> search ( $ keywords , 20 , true ) ; return $ builder ; }
Gets node searching builder

@param string $keywords
@param string $type
@param int $limit
@param string $locale
@return Builder
Gets node searching builder