mirror of
https://github.com/mivodev/mivo.git
synced 2026-01-26 13:31:56 +07:00
Initial Release v1.0.0: Full feature set with Docker automation, Nginx/Alpine stack
This commit is contained in:
20
app/Core/Controller.php
Normal file
20
app/Core/Controller.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Core;
|
||||
|
||||
class Controller {
|
||||
public function view($view, $data = []) {
|
||||
extract($data);
|
||||
$viewPath = ROOT . '/app/Views/' . $view . '.php';
|
||||
|
||||
if (file_exists($viewPath)) {
|
||||
require_once $viewPath;
|
||||
} else {
|
||||
echo "View not found: $view";
|
||||
}
|
||||
}
|
||||
public function redirect($url) {
|
||||
header("Location: " . $url);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user