Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

blade

> 后端框架
Open source

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

863 stars0 likes2 views
WebsiteGitHub

About

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

Blade

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

Installation

Install using composer:

bash
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.

php
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:

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

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

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

Which allows you to use the following in your blade template:

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.

Integrations

  • Phalcon Slayer Framework comes out of the box with Blade.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPbladelaraveltemplate-engineview

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架