alxarafe/resource-blade

This package is abandoned and no longer maintained. The author suggests using the alxarafe/resource-controller package instead.

Blade adapter for alxarafe/resource-controller. Provides a RendererContract implementation using Laravel's Blade engine for server-side template rendering.

Maintainers

Package info

github.com/alxarafe/resource-blade

Language:Blade

pkg:composer/alxarafe/resource-blade

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-04-24 08:04 UTC

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.

PHP Version CI Tests Static Analysis PRs Welcome

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