Getting Started

How do I create my first view?

Open 2 replies Updated 2026-07-10 09:41

Original post

I ran `php coriander make:view dashboard` and now I have `src/Views/dashboard.php`. Should I return `Responses::view()` from a route, or create an action class first when the page needs data?

Replies

Visible

Keep display markup in the private view. Return Responses::view() from a method file, passing title and prepared data. Extract an action class when request coordination grows.

Visible

That makes sense. I will keep the first static page simple and move reusable behavior into modules when the feature grows.