| Package Data | |
|---|---|
| Maintainer Username: | digivo |
| Maintainer Contact: | hello@digivo.co.uk (Digivo) |
| Package Create Date: | 2016-05-11 |
| Package Last Update: | 2019-09-19 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-03 15:10:15 |
| Package Statistics | |
|---|---|
| Total Downloads: | 15,017 |
| Monthly Downloads: | 2 |
| Daily Downloads: | 0 |
| Total Stars: | 4 |
| Total Watchers: | 1 |
| Total Forks: | 8 |
| Total Open Issues: | 1 |
Originally forked from Flynsarmy/laravel-db-blade-compiler
This package generates and returns a compiled view from a provided string
Require this package in your composer.json and run composer update (or run composer require digivo/laravel-string-blade-compiler:1.* directly):
"digivo/laravel-string-blade-compiler": "1.*"
After updating composer, add the ServiceProvider to the providers array in app/config/app.php
'Digivo\StringBladeCompiler\StringBladeCompilerServiceProvider',
and the Facade to the aliases array in the same file
'StringView' => 'Digivo\StringBladeCompiler\Facades\DigivoView',
You have to also publish the config-file
php artisan vendor:publish
This package offers a StringView facade with the same syntax as View but accepts a string instead of path to view.
return StringView::make('@if ($foo == "Bar") foo is Bar @else foo is not Bar @endif')->with(['foo' => 'Bar'])->render();
laravel-string-blade-compiler is open-sourced software licensed under the MIT license