code16 / laravel-content-renderer
Render blade components inside HTML content
Installs: 5 848
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/contracts: ^10.0|^11.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8|^8.0
- orchestra/testbench: ^8.8|^9.0
- pestphp/pest: ^2.20|^3.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- spatie/laravel-ray: ^1.26
README
This package is used internally for our projects (e.g. Sharp). It allows to render blade <x-
components inside HTML content.
For security reasons the content is not directly compiled in blade, instead it replace components with <x-dynamic-component>
tag and pass HTML attributes.
All attributes passed to component are strings. Attributes starting with :
are not evaluated.
Installation
You can install the package via composer:
composer require code16/laravel-content-renderer
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.