Reference search
Results for "middleware"
Search results focus on framework reference pages. Open a result when you need the full explanation, or use the quick answer below when it matches what you are trying to build.
Quick answer
Add route middleware
Put project middleware in src/Middleware and attach it to a route group or a specific route. Keep CorianderCore middleware framework-owned.
use Middleware\AuthMiddleware;
$router->group('admin', [new AuthMiddleware()], function ($router): void {
$router->get('dashboard', fn () => 'Dashboard');
});
Start Here
Middleware Guide
Middleware Guide Middleware handles cross-cutting request behavior such as authentication, authorization, request checks, redirects, and response headers. Project middleware should...
Routing Module Guide
.../users.php. Route Groups Group routes to share a common URI prefix or middleware: use Psr\Http\Server\MiddlewareInterface; $auth = new class implements MiddlewareInterface { public...
Framework Concepts
...eep route files focused on URL shape, HTTP methods, route groups, and middleware attachment. Controllers Controllers coordinate requests. They receive input, call modules or reposi...
Project Guidance
Request Lifecycle
...t; framework bootstrap -> public/routes.php -> route file -> middleware -> controller -> module or repository -> view or response Understanding this flow helps yo...
Recommended App Architecture
...rianderCore. Use app-owned folders: src/ Controllers/ ApiControllers/ Middleware/ Modules/ Routes/ public/ public_views/ documentation/ database/ nodejs/ resources/ tests/ Framewor...
Production Checklist
...ta server-sideescape public strings in viewsprotect admin routes with middlewarecheck that API payload limits fit the project Logs Use JSON logs when possible: LOG_CHANNEL=file LOG...
Upgrade Guide
...w: changed files under CorianderCoreroute smoke testsdatabase behaviormiddleware behaviorenvironment variable changesrelease notes from the framework repository If the update chang...
Reference
Security Guide
...normalized view key, not raw request path input. CSRF Protection CSRF middleware validates mutating web methods: POST, PUT, PATCH, DELETE.Use \CorianderCore\Core\Security\Csrf::inp...
Custom Module Guide
...ath): array { return []; } } Use it from controllers, route files, or middleware: use Modules\ImageDataExtractor\Extractor; $metadata = (new Extractor())->extract($path); The fr...