ybiel778x / blade
This component is a standalone version of the Blade Template Engine that can be ported and used in different projects. It allows you to use the blade model outside of Laravel.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ybiel778x/blade
Requires
- php: >=7.0
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2025-12-08 03:46:12 UTC
README
This component is a standalone version of the Blade Template Engine that can be ported and used in different projects. It allows you to use the blade model outside of Laravel.
Instal
How to install execute:
composer require ybiel778x/blade
How to use
use CodeAlpha\Blade\BladeCompiler; require __DIR__ . '/vendor/autoload.php'; //Template folder $template = __DIR__ . '/views'; //Compiled template folder $compiled = __DIR__ . '/compiled'; //start instance of blade $blade = new BladeCompiler($template, $compiled); $blade->share([ 'example' => 'example shared vars' ]); //renders the template located in the defined folder //the template file must contain the final extension like '.blade.php' //Ex: welcome.blade.php echo $blade->run("welcome");