feat: Complete Woles Framework v1.0 with enterprise-grade UI
- Add comprehensive error handling system with custom error pages - Implement professional enterprise-style design with Tailwind CSS - Create modular HMVC architecture with clean separation of concerns - Add security features: CSRF protection, XSS filtering, Argon2ID hashing - Include CLI tools for development workflow - Add error reporting dashboard with system monitoring - Implement responsive design with consistent slate color scheme - Replace all emoji icons with professional SVG icons - Add comprehensive test suite with PHPUnit - Include database migrations and seeders - Add proper exception handling with fallback pages - Implement template engine with custom syntax support - Add helper functions and facades for clean code - Include proper logging and debugging capabilities
This commit is contained in:
79
app/Modules/Error/Controller.php
Normal file
79
app/Modules/Error/Controller.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Error;
|
||||
|
||||
use App\Core\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
/**
|
||||
* 404 Not Found page
|
||||
*/
|
||||
public function notFound()
|
||||
{
|
||||
return $this->view('Error.view.404', [
|
||||
'title' => '404 - Page Not Found',
|
||||
'message' => 'The page you are looking for could not be found.',
|
||||
'code' => 404
|
||||
], 404);
|
||||
}
|
||||
|
||||
/**
|
||||
* 500 Internal Server Error page
|
||||
*/
|
||||
public function serverError($exception = null)
|
||||
{
|
||||
return $this->view('Error.view.500', [
|
||||
'title' => '500 - Server Error',
|
||||
'message' => 'Something went wrong on our end.',
|
||||
'code' => 500,
|
||||
'exception' => $exception
|
||||
], 500);
|
||||
}
|
||||
|
||||
/**
|
||||
* 403 Forbidden page
|
||||
*/
|
||||
public function forbidden()
|
||||
{
|
||||
return $this->view('Error.view.403', [
|
||||
'title' => '403 - Forbidden',
|
||||
'message' => 'You do not have permission to access this resource.',
|
||||
'code' => 403
|
||||
], 403);
|
||||
}
|
||||
|
||||
/**
|
||||
* 401 Unauthorized page
|
||||
*/
|
||||
public function unauthorized()
|
||||
{
|
||||
return $this->view('Error.view.401', [
|
||||
'title' => '401 - Unauthorized',
|
||||
'message' => 'You need to be authenticated to access this resource.',
|
||||
'code' => 401
|
||||
], 401);
|
||||
}
|
||||
|
||||
/**
|
||||
* 419 CSRF Token Mismatch
|
||||
*/
|
||||
public function csrfMismatch()
|
||||
{
|
||||
return $this->view('Error.view.419', [
|
||||
'title' => '419 - CSRF Token Mismatch',
|
||||
'message' => 'Your session has expired. Please try again.',
|
||||
'code' => 419
|
||||
], 419);
|
||||
}
|
||||
|
||||
/**
|
||||
* Error Reports page
|
||||
*/
|
||||
public function reports()
|
||||
{
|
||||
return $this->view('Error.view.reports', [
|
||||
'title' => 'Error Reports - Woles Framework'
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user