tempest / view-for-laravel
Laravel support for tempest/view
Fund package maintenance!
tempestphp
dev-main
2025-02-28 10:22 UTC
Requires
- php: ^8.4
- illuminate/contracts: ^12.0
- spatie/laravel-package-tools: ^1.16
- tempest/console: dev-main
- tempest/view: dev-main
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
This package is auto-updated.
Last update: 2025-02-28 10:22:32 UTC
README
Laravel support for tempest/view
Bringing tempest/view to Laravel.Read the documentation to get started.
Installation
You can install the package via composer:
composer require tempest/view-for-laravel
Usage
From any controller, simply return an instance of \Tempest\ViewForLaravel\TempestView
:
use Tempest\ViewForLaravel\GenericTempestView; final readonly class HomeController { public function __invoke() { return new GenericTempestView(__DIR__ . '/Views/home.view.php'); } }
<!-- home.view.php --> <x-layout> <h1>Hello Laravel</h1> </x-layout> <!-- x-layout.view.php --> <x-component name="x-layout"> <html lang="en"> <head> <title>Tempest View</title> </head> <body> <x-slot /> </body> </html> </x-component>