Reference search
Results for "controllers"
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
Create a controller
Use the controller generator, then keep request handling in the controller and move business logic into a service or repository.
php coriander make:controller Blog
php coriander make:controller Blog --api
Start Here
Controller Guide
Controller Guide Controllers handle HTTP requests and live under src/Controllers (or src/ApiControllers for API endpoints). Creating a Controller Generate a controller with the CLI...
Framework Concepts
... on URL shape, HTTP methods, route groups, and middleware attachment. Controllers Controllers coordinate requests. They receive input, call modules or repositories, and render a vi...
CLI Guide
...ation CreateUsersTablephp coriander migrate:statusphp coriander cache controllersphp coriander nodejs run build-tsphp coriander nodejs run build-prodphp coriander versionphp corian...
Dynamic View Guide
...n array of prepared data: <?php declare(strict_types=1); namespace Controllers; use CorianderCore\Core\Router\ViewRenderer; use Nyholm\Psr7\Response; use Psr\Http\Message\Server...
Routing Module Guide
...erPHP's routing system maps incoming HTTP requests to callbacks, controllers, or views. By default, controller names and the built-in router handle most paths automatically. C...
Install CorianderPHP
...r installation, create your first route, controller, and view: RoutingControllersViewsRecommended App Architecture
Project Guidance
Recommended App Architecture
...ut project behavior inside CorianderCore. Use app-owned folders: src/ Controllers/ ApiControllers/ Middleware/ Modules/ Routes/ public/ public_views/ documentation/ database/ nodej...
Database Patterns
...on create_posts_table php coriander migrate Do not create tables from controllers. Controllers handle requests. Migrations describe database structure. Simple Helpers Use helpers f...
Request Lifecycle
...tes. It should decide whether the request may continue. 4. Controller Controllers coordinate the request: final class BlogController { public function index(): void { $posts = (new...
Upgrade Guide
... resources/ scripts/ tests/ These folders should contain your routes, controllers, modules, views, documentation, assets, migrations, and tests. Update Flow Preview first: php cori...
Reference
Cache Command Guide
...eeds up routing by precomputing controller file paths stored in cache/controllers.php. Usage Build the controller cache: php coriander cache controllers Generate every available ca...
Custom Module Guide
...ic function extract(string $path): array { return []; } } Use it from controllers, route files, or middleware: use Modules\ImageDataExtractor\Extractor; $metadata = (new Extractor(...