Sample of using Blade template system on PHP without using Laravel.
- PHP 8.2.x
- Composer
Run composer install
on the project directory.
Then we just use PHP built-in web server. Run this on this project directory.
php -S localhost:3000 -t public
- Look at
public/index.php
, that's the entry point. - Look at
src/Blade.php
, that's the class of Blade that prepare when constructor run and hasrender()
function to render the template. - Look at
src/Config.php
, contains some config need for Blade, such as templates directory and target directory of compiled templates.
MIT
Maintained by Sony Arianto Kurniawan <sony@sony-ak.com> and contributors.