https://github.com/loic-sharma/laravel-template
A Blade extension
https://github.com/loic-sharma/laravel-template
Last synced: about 2 months ago
JSON representation
A Blade extension
- Host: GitHub
- URL: https://github.com/loic-sharma/laravel-template
- Owner: loic-sharma
- Created: 2012-05-05T21:06:27.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-05-08T22:34:17.000Z (about 13 years ago)
- Last Synced: 2024-10-19T00:36:35.248Z (8 months ago)
- Language: PHP
- Size: 103 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Laravel Template Bundle - A Blade extension
Laravel Template lets you register helpers to the Blade to integrate your project's modules with your views.
### Examples
**Basic Helper**
Creating a helper is very easy:
Template::helper('helloworld', function()
{
return 'Hello World!';
});This would replace:
{{helloworld}}
**Helper Parameters**
Helpers can have parameters:
Template::helper('show', function($params)
{
return $params['message'];
});This would parse:
{{show message="This is the parameter"}}
**Miscellaneous**
The name of the helper is very flexible:
Template::helper('cms:module:method', function($params)
{
// Do something here
});This would parse the following tag:
{{cms:module:method param1="value1"}}