marko / view
Marko Framework View - Templating interfaces and contracts
0.0.1
2026-03-25 17:53 UTC
Requires
- php: ^8.5
- marko/config: 0.0.1
- marko/core: 0.0.1
- marko/routing: 0.0.1
Requires (Dev)
- marko/testing: 0.0.1
- pestphp/pest: ^4.0
This package is auto-updated.
Last update: 2026-03-25 21:07:19 UTC
README
View and template rendering interface -- defines how controllers render templates, not which engine is used.
Installation
composer require marko/view
Note: You also need a view driver. Install marko/view-latte for Latte template support.
Quick Example
use Marko\Routing\Attributes\Get; use Marko\Routing\Http\Response; use Marko\View\ViewInterface; class PostController { public function __construct( private readonly ViewInterface $view, ) {} #[Get('/posts/{id}')] public function show(int $id): Response { return $this->view->render('blog::post/show', [ 'post' => $this->findPost($id), ]); } }
Documentation
Full usage, API reference, and examples: marko/view