https://github.com/rakit/blade
PHP Blade template engine outside Laravel
https://github.com/rakit/blade
Last synced: 2 months ago
JSON representation
PHP Blade template engine outside Laravel
- Host: GitHub
- URL: https://github.com/rakit/blade
- Owner: rakit
- Created: 2016-01-14T16:12:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-12T15:25:53.000Z (over 9 years ago)
- Last Synced: 2025-12-14T21:51:59.615Z (6 months ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Rakit Blade
--------------
[](https://travis-ci.org/rakit/blade)
[](http://doge.mit-license.org)
Blade Template Engine outside Laravel Framework.
## Usage Example
```php
render('myview');
// or render with data
$rendered = $blade->render('myview', [ 'message' => 'foobar' ]);
```
## Extending Compiler
You can extend compiler using `extend` method.
```php
// register @upper() compiler
$blade->extend(function($view, $compiler) {
$pattern = $compiler->createMatcher('upper');
return preg_replace($pattern, '$1', $view);
});
// you can use it in your view file by @upper('my string')
```