public static function getSearchableModels()
    {
        $searchableModels = [];

        foreach (config('scout.tntsearch.searchableModels') as $model) {
            $modelName = substr($model, strrpos($model, '\\') + 1);

            if (count(preg_grep("/$modelName/", $searchableModels)) > 0) {
                continue;
            }

            $searchableModels[] = $model;
        }

        return $searchableModels;
    }
public static function getSearchableModels()
    {
        $searchableModels = [];

        foreach (config('scout.tntsearch.searchableModels') as $model) {
            $modelName = substr($model, strrpos($model, '\\') + 1);

            if (count(preg_grep("/$modelName/", $searchableModels)) > 0) {
                continue;
            }

            $searchableModels[] = $model;
        }

        return $searchableModels;
    }
public static function getSearchableModels ( ) { $ searchableModels = [ ] ; foreach ( config ( 'scout.tntsearch.searchableModels' ) as $ model ) { $ modelName = substr ( $ model , strrpos ( $ model , '\\' ) + 1 ) ; if ( count ( preg_grep ( "/$modelName/" , $ searchableModels ) ) > 0 ) { continue ; } $ searchableModels [ ] = $ model ; } return $ searchableModels ; }
Filters our duplicates and retrieves an array of
searchable models from our configuration file
@return array
Filters our duplicates and retrieves an array of searchable models from our configuration file