2017 © Pedro Peláez
 

library laravel-string-blade-compiler

Render Blade templates from a string

image

bilaliqbalr/laravel-string-blade-compiler

Render Blade templates from a string

  • Tuesday, August 15, 2017
  • by bilaliqbalr
  • Repository
  • 1 Watchers
  • 1 Stars
  • 601 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 5 Versions
  • 14 % Grown

The README.md

String Blade Compiler

Originally forked from Flynsarmy/laravel-db-blade-compiler, (*1)

Render Blade templates from a string

This package generates and returns a compiled view from a provided string, (*2)

Installation (Laravel 5.4.x)

Require this package in your composer.json and run composer update (or run composer require bilaliqbalr/laravel-string-blade-compiler:1.* directly):, (*3)

"bilaliqbalr/laravel-string-blade-compiler": "1.*"

After updating composer, add the ServiceProvider to the providers array in app/config/app.php, (*4)

Bilaliqbalr\StringBladeCompiler\StringBladeCompilerServiceProvider::class,

and the Facade to the aliases array in the same file, (*5)

'StringView'          => Bilaliqbalr\StringBladeCompiler\Facades\StringView::class,

You have to also publish the config-file, (*6)

php artisan vendor:publish

Usage

This package offers a StringView facade with the same syntax as View but accepts a string instead of path to view., (*7)

return StringView::make('@if ($foo == "Bar") foo is Bar @else foo is not Bar @endif')->with(['foo' => 'Bar'])->render();

License

laravel-string-blade-compiler is open-sourced software licensed under the MIT license, (*8)

The Versions

15/08 2017

dev-master

9999999-dev

Render Blade templates from a string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar digivo

laravel eloquent model blade compiler

15/08 2017

1.3

1.3.0.0

Render Blade templates from a string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar digivo

laravel eloquent model blade compiler

22/02 2017

1.2

1.2.0.0

Render Blade templates from a string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar digivo

laravel eloquent model blade compiler

13/05 2016

1.1

1.1.0.0

Render Blade templates from a string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar digivo

laravel eloquent model blade compiler

11/05 2016

1.0

1.0.0.0

Render Blade templates from a string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar digivo

laravel eloquent model blade compiler