public function __construct() { parent::__construct(); $connObj = new Conexao(); $this->connection = $connObj->getConnection(); $this->model = new Usuario($this->connection); }
public function __construct() { parent::__construct(); $connObj = new Conexao(); $this->connection = $connObj->getConnection(); $this->loginObject = new \App\Util\Login($this->connection); $this->model = new \App\Model\Usuario($this->connection); }
<?php use App\Database\Conexao; $connOb = new Conexao(); $connection = $connOb->getConnection(); $stmt = $connection->prepare("SELECT * FROM empresa"); $stmt->execute(); $row = $stmt->fetch(\PDO::FETCH_ASSOC); ?> <ol class="breadcrumb"> <li><a href="/home">Home</a></li> <li><a href="/empresa">Empresa</a></li> </ol> <h1><?php echo htmlentities($row['nome'], ENT_QUOTES, 'UTF-8'); ?> </h1> <p><?php echo $row['descricao']; ?> </p>