diff --git a/app/controllers/UserController.php b/app/controllers/UserController.php index c8a7114..91aa250 100644 --- a/app/controllers/UserController.php +++ b/app/controllers/UserController.php @@ -15,6 +15,7 @@ use http\Message; use Itguild\Tables\ListJsonTable; use Itguild\Tables\ViewJsonTable; use JetBrains\PhpStorm\NoReturn; +use kernel\App; use kernel\Controller; use kernel\IGTabel\btn\PrimaryBtn; use kernel\IGTabel\ListJsonTableEloquentCollection; @@ -62,6 +63,7 @@ class UserController extends Controller{ { // $users = User::where(['role' => 1])->get(); $users = User::all(); + //App::$header->add("asd", "asd"); $this->cgView->render("user/index.php", ['users' => $users]); } diff --git a/bootstrap.php b/bootstrap.php index fec1ff7..8aeb15f 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -5,6 +5,7 @@ $dotenv = Dotenv\Dotenv::createImmutable(__DIR__); $dotenv->load(); include_once __DIR__ . "/bootstrap/db.php"; +include_once __DIR__ . "/bootstrap/header.php"; const ROOT_DIR = __DIR__; const KERNEL_DIR = __DIR__ . "/kernel"; const CONSOLE_DIR = __DIR__ . "/kernel/console"; diff --git a/bootstrap/header.php b/bootstrap/header.php new file mode 100644 index 0000000..fdc1e26 --- /dev/null +++ b/bootstrap/header.php @@ -0,0 +1,3 @@ +getData()); $response = $dispatcher->dispatch($_SERVER['REQUEST_METHOD'], parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); - header('Content-Type: ' . App::$responseType); + //header('Content-Type: ' . App::$responseType); App::$header->set(); echo $response; }