<?php
|
namespace App\Controllers;
|
|
use App\Models\FiatModel;
|
use Framework\Controller;
|
class Fiat extends Controller {
|
|
public function __construct(private FiatModel $model)
|
{
|
|
}
|
public function index() {
|
return $this->view("Fiat/index.mvc.php", [
|
]);
|
}
|
|
public function panda() {
|
return $this->view("Fiat/panda.mvc.php", [
|
]);
|
}
|
|
public function fiat500() {
|
return $this->view("Fiat/fiat500.mvc.php", [
|
]);
|
}
|
|
public function tipo() {
|
return $this->view("Fiat/tipo.mvc.php", [
|
]);
|
}
|
|
public function contact() {
|
if($_SERVER['REQUEST_METHOD'] === 'POST') {
|
$data = [
|
"email" => $this->request->post["email"],
|
"number" => $this->request->post["number"]
|
];
|
|
$this->model->insert($data);
|
}
|
|
|
return $this->view("Fiat/contact.mvc.php", [
|
]);
|
}
|
|
}
|