Download the PHP package protonemedia/laravel-blade-on-demand without Composer
On this page you can find all versions of the php package protonemedia/laravel-blade-on-demand. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download protonemedia/laravel-blade-on-demand
More information about protonemedia/laravel-blade-on-demand
Files in protonemedia/laravel-blade-on-demand
Package laravel-blade-on-demand
Short Description Compile Blade templates in memory
License MIT
Homepage https://github.com/protonemedia/laravel-blade-on-demand
Informations about the package laravel-blade-on-demand
Laravel Blade On Demand
Laravel package to compile Blade templates in memory. Requires PHP 8.2 or higher, compatible with Laravel 10+.
Sponsor Us
❤️ We proudly support the community by developing Laravel packages and giving them away for free. If this package saves you time or if you're relying on it professionally, please consider sponsoring the maintenance and development and check out our latest premium package: Inertia Table. Keeping track of issues and pull requests takes time, but we're happy to help!
Installation
You can install the package via composer:
Usage
Render Blade template
You can render any valid Blade Template by calling the render
method on the BladeOnDemand
facade. The method only takes two parameters, the template content and the data you want to pass to the template.
This is a just an example but you can use statements, components and other Blade features as well.
Handle missing variables
This feature prevents your render from failing whenever a variable is missing in your data array. By default it will fill the missing variable with the name of the variable itself. In this case $name
is missing so the data array becomes ['name' => 'name']
;
You could also use this feature to preview a template without any data. Note that this might give unexpected results when using statements. You can also pass a callable
to the fillMissingVariables
method to customize the handling of missing variables:
Render Markdown Mail to HTML
This feature can be used to render a mail as if you're using a Markdown mailable.
You can optionally specify a theme, just like calling the theme
method on a Mailable.
Render Markdown Mail to text
Similair feature as the above renderMarkdownMailToHtml
method except it uses components from the text
directory. You can read more about this feature in the Laravel documentation.
Parse Maildown Mail
The parseMarkdownMail
method is the same as the renderMarkdownMailToText
method but it also parses the Markdown.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Other Laravel packages
Inertia Table
: The Ultimate Table for Inertia.js with built-in Query Builder.Laravel Cross Eloquent Search
: Laravel package to search through multiple Eloquent models.Laravel Eloquent Scope as Select
: Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes and constraints by adding them as a subquery.Laravel FFMpeg
: This package provides an integration with FFmpeg for Laravel. The storage of the files is handled by Laravel's Filesystem.Laravel MinIO Testing Tools
: Run your tests against a MinIO S3 server.Laravel Mixins
: A collection of Laravel goodies.Laravel Paddle
: Paddle.com API integration for Laravel with support for webhooks/events.Laravel Task Runner
: Write Shell scripts like Blade Components and run them locally or on a remote server.Laravel Verify New Email
: This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.Laravel XSS Protection
: Laravel Middleware to protect your app against Cross-site scripting (XSS). It sanitizes request input, and it can sanatize Blade echo statements.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Pascal Baljet
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-blade-on-demand with dependencies
illuminate/mail Version ^10.48|^11.43|^12.0
illuminate/view Version ^10.48|^11.43|^12.0