alxarafe / resource-blade
Blade adapter for alxarafe/resource-controller. Provides a RendererContract implementation using Laravel's Blade engine for server-side template rendering.
Requires
- php: ^8.2
- alxarafe/resource-controller: ^0.1
- illuminate/events: ^10.0 || ^11.0 || ^12.0
- illuminate/filesystem: ^10.0 || ^11.0 || ^12.0
- illuminate/view: ^10.0 || ^11.0 || ^12.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.10
- vimeo/psalm: ^6.0
This package is auto-updated.
Last update: 2026-04-24 08:13:06 UTC
README
Warning
DEPRECATED AND OBSOLETE
This package has been deprecated and its functionality has been natively integrated into resource-controller via the DefaultRenderer and static HTML templates.
You no longer need this package. Please remove it from your dependencies.
Blade adapter for alxarafe/resource-controller.
Provides a RendererContract implementation using Laravel's Blade engine for server-side template rendering.
Ecosystem
| Package | Purpose | Status |
|---|---|---|
| resource-controller | Core CRUD engine + UI components | ✅ Stable |
| resource-eloquent | Eloquent ORM adapter | ✅ Stable |
| resource-blade | Blade template renderer adapter | ✅ Stable |
| resource-twig | Twig template renderer adapter | 🚧 Coming soon |
Installation
composer require alxarafe/resource-blade
This will also install alxarafe/resource-controller as a dependency.
Usage
use Alxarafe\ResourceBlade\BladeRenderer; // Create a renderer with template paths and cache directory $renderer = new BladeRenderer( templatePaths: [__DIR__ . '/views'], cachePath: __DIR__ . '/cache/views' ); // Render a template echo $renderer->render('products.index', [ 'title' => 'Products', 'items' => $products, ]); // Add additional template paths at runtime $renderer->addTemplatePath(__DIR__ . '/module-views');
Standalone (without Laravel)
This package works without the full Laravel framework. It only requires illuminate/view and illuminate/filesystem, which are lightweight components.
With Laravel
If you're already using Laravel, you can still use this adapter to provide a consistent RendererContract interface that decouples your resource controllers from Laravel's view system.
Development
Docker
docker compose up -d
docker exec alxarafe-resources composer install
Running the CI pipeline locally
bash bin/ci_local.sh
Running tests only
bash bin/run_tests.sh
License
GPL-3.0-or-later