2017 © Pedro Peláez
 

library blade

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

image

jenssegers/blade

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

  • Tuesday, April 3, 2018
  • by jenssegers
  • Repository
  • 12 Watchers
  • 197 Stars
  • 32,377 Installations
  • PHP
  • 25 Dependents
  • 1 Suggesters
  • 30 Forks
  • 6 Open issues
  • 3 Versions
  • 17 % Grown

The README.md

Blade

Latest Stable Version Coverage Status, (*1)

The standalone version of Laravel's Blade templating engine for use outside of Laravel., (*2)

, (*3)

Installation

Install using composer:, (*4)

composer require jenssegers/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. More information about the Blade templating engine can be found on http://laravel.com/docs/5.8/blade., (*5)

use Jenssegers\Blade\Blade;

$blade = new Blade('views', 'cache');

echo $blade->make('homepage', ['name' => 'John Doe'])->render();

Alternatively you can use the shorthand method render:, (*6)

echo $blade->render('homepage', ['name' => 'John Doe']);

You can also extend Blade using the directive() function:, (*7)

$blade->directive('datetime', function ($expression) {
    return "<?php echo with({$expression})->format('F d, Y g:i a'); ?>";
});

Which allows you to use the following in your blade template:, (*8)

Current date: @datetime($date)

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. Check out the original documentation for more information., (*9)

Integrations

The Versions

03/04 2018

dev-master

9999999-dev

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel template blade view render

23/08 2016

v1.1.0

1.1.0.0

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel template blade view render

29/08 2015

v1.0.0

1.0.0.0

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel template blade view render