proxitok/app/Helpers/ErrorHandler.php

13 lines
290 B
PHP
Raw Normal View History

<?php
2022-01-30 18:02:52 -05:00
namespace App\Helpers;
2022-02-05 18:58:30 -05:00
use App\Models\ErrorTemplate;
2022-01-28 09:54:09 -05:00
class ErrorHandler {
2022-01-13 10:51:45 -05:00
static public function show(object $meta) {
2022-01-28 09:54:09 -05:00
http_response_code($meta->http_code);
2022-01-13 10:51:45 -05:00
$latte = Misc::latte();
2022-02-05 18:58:30 -05:00
$latte->render(Misc::getView('error'), new ErrorTemplate($meta));
}
}