在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):jenssegers/blade开源软件地址(OpenSource Url):https://github.com/jenssegers/blade开源编程语言(OpenSource Language):PHP 72.6%开源软件介绍(OpenSource Introduction):BladeThe standalone version of Laravel's Blade templating engine for use outside of Laravel. InstallationInstall using composer: composer require jenssegers/blade UsageCreate 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 use Jenssegers\Blade\Blade;
$blade = new Blade('views', 'cache');
echo $blade->make('homepage', ['name' => 'John Doe'])->render(); Alternatively you can use the shorthand method echo $blade->render('homepage', ['name' => 'John Doe']); You can also extend Blade using the $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:
The Blade instances passes all methods to the internal view factory. So methods such as Integrations
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论