public static function getModels(string $connectionManager = 'default', bool $excludePhinxlog = true): array
    {
        $result = [];
        $tables = ConnectionManager::get($connectionManager)->getSchemaCollection()->listTables();

        if (empty($tables)) {
            return $result;
        }

        foreach ($tables as $table) {
            if ($excludePhinxlog && preg_match('/phinxlog/', $table)) {
                continue;
            }

            $result[$table] = Inflector::humanize($table);
        }

        return $result;
    }
public static function getModels(string $connectionManager = 'default', bool $excludePhinxlog = true): array
    {
        $result = [];
        $tables = ConnectionManager::get($connectionManager)->getSchemaCollection()->listTables();

        if (empty($tables)) {
            return $result;
        }

        foreach ($tables as $table) {
            if ($excludePhinxlog && preg_match('/phinxlog/', $table)) {
                continue;
            }

            $result[$table] = Inflector::humanize($table);
        }

        return $result;
    }
public static function getModels ( string $ connectionManager = 'default' , bool $ excludePhinxlog = true ) : array { $ result = [ ] ; $ tables = ConnectionManager :: get ( $ connectionManager ) -> getSchemaCollection ( ) -> listTables ( ) ; if ( empty ( $ tables ) ) { return $ result ; } foreach ( $ tables as $ table ) { if ( $ excludePhinxlog && preg_match ( '/phinxlog/' , $ table ) ) { continue ; } $ result [ $ table ] = Inflector :: humanize ( $ table ) ; } return $ result ; }
Get All Models

Fetch the list of database models escaping phinxlog

@param string $connectionManager to know which schema to fetch
@param bool $excludePhinxlog flag to exclude phinxlog tables.

@return mixed[] $result containing the list of models from database
Get All Models