Skip to content

Instantly share code, notes, and snippets.

View andre-mz's full-sized avatar

The IT Guy andre-mz

View GitHub Profile
@andre-mz
andre-mz / adicionar.php
Created January 9, 2020 22:05
Views/eventos
<?php
require APPROOT . '/views/inc/header.php';
?>
<div class="row">
<div class="col-md-11">
<h5 class="mt-2">Criar Novo Evento</h5>
</div>
<div class="col-md-0">
@andre-mz
andre-mz / Evento.php
Created January 9, 2020 22:01
Models
<?php
class Evento{
private $db;
public function __construct(){
$this->db = new Database;
}
public function getEventos(){
$this->db->query('SELECT *,
@andre-mz
andre-mz / Evento.php
Created January 9, 2020 21:58
Controller
<?php
class Eventos extends Controller {
public function __construct(){
if (!estaLogado()){
redirect('usuario/login ');
}
//instancia as classes do model
$this->postModel = $this->model('Evento');