2017 © Pedro Peláez
 

library string-blade-compiler

Laravel Blade String Compiler, render string as blade templates

image

wpb/string-blade-compiler

Laravel Blade String Compiler, render string as blade templates

  • Friday, April 6, 2018
  • by TerrePorter
  • Repository
  • 5 Watchers
  • 87 Stars
  • 193,637 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 33 Forks
  • 8 Open issues
  • 28 Versions
  • 7 % Grown

The README.md

String Blade Compiler

Render Blade templates from string value., (*1)

This is a fork from https://github.com/Flynsarmy/laravel-db-blade-compiler which uses Elequent model to pass in a template., (*2)

I have reworked it to allow for a generic array of the required fields to generates and return a compiled view from a blade-syntax template., (*3)

Version

This version 1 is for Laravel 4.2, version 2 is for Laravel 5., (*4)

Installation

Add the repository to composer.json:, (*5)

"repositories": [
{
    "name": "wpb/string-blade-compiler",
    "url": "https://github.com/TerrePorter/StringBladeCompiler.git",
    "type": "git"
}
],

Add the package to composer.json:, (*6)

"require": {
    "laravel/framework": "4.2.*",
    "wpb/string-blade-compiler": "1.*@dev"
},

Add the ServiceProvider to the providers array in app/config/app.php, (*7)

'Wpb\StringBladeCompiler\StringBladeCompilerServiceProvider',, (*8)

There is no need to add a Facade to the aliases array in the same file as the service provider, this is being included automatically in the ServiceProvider., (*9)

Usage

This package offers a StringView facade with the same syntax as View but accepts a Array or Array Object instance instead of path to view., (*10)

return StringView::make(
                        array(
                            // this actual blade template
                            'template'  => '{{ $token1 }}',
                            // this is the cache file key, converted to md5
                            'cache_key' => 'my_unique_cache_key',
                            // timestamp for when the template was last updated, 0 is always recompile
                            'updated_at' => 1391973007
                        ),
                        array(
                            'token1'=> 'token 1 value'
                        )
                );

Also allows for Blade::extend, example :, (*11)

                        // allows for @continue and @break in foreach in blade templates
                        StringView::extend(function($value)
                        {
                          return preg_replace('/(\s*)@(break|continue)(\s*)/', '$1<?php $2; ?>$3', $value);
                        });

License

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

The Versions

06/04 2018

3.4.x-dev

3.4.9999999.9999999-dev

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

06/04 2018

3.4.1

3.4.1.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

10/03 2018

3.5.x-dev

3.5.9999999.9999999-dev

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

10/03 2018

3.5.5

3.5.5.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

21/02 2018

3.6.x-dev

3.6.9999999.9999999-dev

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

21/02 2018

3.6

3.6.0.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

03/02 2018

3.5.4

3.5.4.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

21/10 2017

3.5.3

3.5.3.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

02/09 2017

3.0.x-dev

3.0.9999999.9999999-dev

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

The Development Requires

by Terre Porter

laravel blade compiler

02/09 2017

3.5.2

3.5.2.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

27/01 2017

3.4.0

3.4.0.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

30/08 2016

3.5.1

3.5.1.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

The Development Requires

by Terre Porter

laravel blade compiler

30/08 2016

3.2.x-dev

3.2.9999999.9999999-dev

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

30/08 2016

3.3.x-dev

3.3.9999999.9999999-dev

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

30/08 2016

3.3.0

3.3.0.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

30/08 2016

dev-TerrePorter-patch-1

dev-TerrePorter-patch-1

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

05/07 2016

3.2.2

3.2.2.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

09/03 2016

2.0.x-dev

2.0.9999999.9999999-dev

Render Blade templates from string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Terre Porter

laravel blade compiler

04/03 2016

3.0.2

3.0.2.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

The Development Requires

by Terre Porter

laravel blade compiler

09/02 2016

3.2.1

3.2.1.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

09/02 2016

3.0.1

3.0.1.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

23/12 2015

3.2.0

3.2.0.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

21/10 2015

1.0.x-dev

1.0.9999999.9999999-dev

Render Blade templates from string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Terre Porter

laravel blade compiler

18/08 2015

3.0.0

3.0.0.0

Laravel Blade String Compiler, render string as blade templates

  Sources   Download

MIT

The Requires

 

by Terre Porter

laravel blade compiler

24/06 2015

2.1.0

2.1.0.0

Render Blade templates from string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Terre Porter

laravel blade compiler

22/02 2015

dev-master

9999999-dev

Render Blade templates from string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Terre Porter

laravel blade compiler

22/02 2015

1.0.0

1.0.0.0

Render Blade templates from string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Terre Porter

laravel blade compiler

24/01 2015

2.0.0

2.0.0.0

Render Blade templates from string

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Terre Porter

laravel blade compiler