Add error log management and bulk admin actions

Introduces error log tracking with new ErrorLog model, controller, views, and migration. Adds admin UI for viewing, resolving, and deleting errors. Implements bulk actions for users and notification groups, refactors domain filtering/pagination, and centralizes admin access checks using Auth::requireAdmin().
This commit is contained in:
Hosteroid
2025-10-10 14:01:19 +03:00
parent a29becc944
commit b50377492c
38 changed files with 3726 additions and 428 deletions

View File

@@ -2,30 +2,30 @@
namespace Core;
use App\Services\ErrorHandler;
class Application
{
public static Router $router;
public static Database $db;
private ErrorHandler $errorHandler;
public function __construct()
{
self::$router = new Router();
self::$db = new Database();
// Initialize error handler
$this->errorHandler = new ErrorHandler();
}
public function run()
{
try {
self::$router->resolve();
} catch (\Exception $e) {
http_response_code(500);
if ($_ENV['APP_ENV'] === 'development') {
echo '<h1>Error</h1>';
echo '<pre>' . $e->getMessage() . '</pre>';
echo '<pre>' . $e->getTraceAsString() . '</pre>';
} else {
echo '<h1>500 - Internal Server Error</h1>';
}
} catch (\Throwable $e) {
// Use centralized error handler
$this->errorHandler->handleException($e);
}
}
}