protected function getTableAndDatabase($model)
    {
        $table = $model->getConnection()->getTablePrefix() . $model->getTable();

        $database = null;

        if (strpos($table, '.')) {
            list($database, $table) = explode('.', $table);
        }

        return [$table, $database];
    }
protected function getTableAndDatabase($model)
    {
        $table = $model->getConnection()->getTablePrefix() . $model->getTable();

        $database = null;

        if (strpos($table, '.')) {
            list($database, $table) = explode('.', $table);
        }

        return [$table, $database];
    }
protected function getTableAndDatabase ( $ model ) { $ table = $ model -> getConnection ( ) -> getTablePrefix ( ) . $ model -> getTable ( ) ; $ database = null ; if ( strpos ( $ table , '.' ) ) { list ( $ database , $ table ) = explode ( '.' , $ table ) ; } return [ $ table , $ database ] ; }
Get the table and database names of a model.

@param  Model $model
@return array
Get the table and database names of a model .