2017 © Pedro PelĂĄez
 

library blade

Laravel blade templating out of the box

image

xaamin/blade

Laravel blade templating out of the box

  • Wednesday, November 15, 2017
  • by xaamin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 106 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 6 % Grown

The README.md

Blade

Standalone version of Blade templating engine for use outside of Laravel., (*1)

Installation

composer require xaamin/blade

Usage

Create a Blade instance by passing it the folder(s) where your view files are located, and a cache folder. Render a template by calling the make method., (*2)

    use Xaamin\Blade\View;

    $view = new View('views', 'cache');

    echo $view->make('home', ['name' => 'John Doe']);

Now you can easily create a directive by calling the compiler() function, (*3)

    $view->compiler()->directive('money', function ($expression) {
        return "<?= '$ ' . number_format($expression, 2, '.', ','); ?>";
    });

In your Blade Template, (*4)

    <?php $decimal = '520.50' ?>
    @datetime($decimal)

The Blade instances passes all methods to the internal view factory. So methods such as exists, file, share, composer and creator are available as well., (*5)

More information about the Blade templating engine can be found on http://laravel.com/docs/5.3/blade., (*6)

The Versions

15/11 2017

dev-master

9999999-dev

Laravel blade templating out of the box

  Sources   Download

The Requires

 

15/11 2017

v1.1.2

1.1.2.0

Laravel blade templating out of the box

  Sources   Download

The Requires

 

15/11 2017

v1.1

1.1.0.0

Laravel blade templating out of the box

  Sources   Download

The Requires

 

29/12 2016

v1.0

1.0.0.0

Laravel blade templating out of the box

  Sources   Download

The Requires