Handlers and Routes

When should I use src/Views?

Open 1 replies Updated 2026-07-10 10:24

Original post

Create a method file under `src/Views` for each endpoint, such as `forum-demo/topics/index.get.php`. CorianderPHP discovers it automatically. Put `_middleware.php` in a directory when all its child endpoints need shared protection.

Replies

Visible

An admin directory can declare its permission middleware once in _middleware.php. All child method files inherit it, along with root CSRF protection.