From 22b1e1c1c5ac7c48bf6cf2b06237a0e180fd550d Mon Sep 17 00:00:00 2001
From: filippo.bertilotti <filippobertilotti@gmail.com>
Date: Tue, 11 Jun 2024 11:25:39 +0200
Subject: [PATCH] tolto test var dump

---
 src/App/Controllers/fiat.php |   41 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/src/App/Controllers/fiat.php b/src/App/Controllers/fiat.php
index f9cace6..c352617 100644
--- a/src/App/Controllers/fiat.php
+++ b/src/App/Controllers/fiat.php
@@ -1,10 +1,49 @@
 <?php
 namespace App\Controllers;
+
+use App\Models\Contact;
 use Framework\Controller;
 class Fiat extends Controller {
+    
+    public function __construct(private Contact $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"],
+                "telefono" => $this->request->post["telefono"]
+            ];
+
+            $this->model->insert($data);
+        }
+        $errors = $this->model->getErrors();
+
+        return $this->view("Fiat/contact.mvc.php", [
+            "errors" => $errors
+        ]);
+    }
+
 }
\ No newline at end of file

--
Gitblit v1.8.0