src/Common/Console/Command/Make/Model.php
private function createDatabaseTable(\stdClass $oModel, string $sTemplate): self
    {
        $this->oOutput->write('Adding database table... ');
        $oModel->nails_db_prefix = NAILS_DB_PREFIX;
        $oDb                     = Factory::service('PDODatabase');
        $oDb->query($this->getResource('template/' . $sTemplate . '.php', (array) $oModel));
        $this->oOutput->writeln('<info>done!</info>');

        return $this;
    }
private function createDatabaseTable(\stdClass $oModel, string $sTemplate): self
    {
        $this->oOutput->write('Adding database table... ');
        $oModel->nails_db_prefix = NAILS_DB_PREFIX;
        $oDb                     = Factory::service('PDODatabase');
        $oDb->query($this->getResource('template/' . $sTemplate . '.php', (array) $oModel));
        $this->oOutput->writeln('<info>done!</info>');

        return $this;
    }
private function createDatabaseTable ( \ stdClass $ oModel , string $ sTemplate ) : self { $ this -> oOutput -> write ( 'Adding database table... ' ) ; $ oModel -> nails_db_prefix = NAILS_DB_PREFIX ; $ oDb = Factory :: service ( 'PDODatabase' ) ; $ oDb -> query ( $ this -> getResource ( 'template/' . $ sTemplate . '.php' , ( array ) $ oModel ) ) ; $ this -> oOutput -> writeln ( '<info>done!</info>' ) ; return $ this ; }
Creates the database table

@param \stdClass $oModel    The model being created
@param string    $sTemplate The template to use

@return $this
@throws NailsException
@throws FactoryException
Creates the database table