-
Notifications
You must be signed in to change notification settings - Fork 32
/
README
34 lines (23 loc) · 988 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
This class is a port of Laravel's blade templating system for CodeIgniter framework.
It's compatible with Modular Extensions - HMVC and it uses the file cache for store compiled templates.
To install simply put the file into application/libraries and make sure that application/cache folder is writable.
By default template views must have .blade.php as extension. You can change this in $blade_ext class property.
Example usage in a controller:
class Test extends MX_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('blade');
}
public function index()
{
// renders /views/test.blade.php or /modules/test/views/test.blade.php
$this->blade->set('foo', 'bar')
->set('an_array', array(1, 2, 3, 4))
->append('an_array', 5)
->set_data(array('more' => 'data', 'other' => 'data'))
->render('test', array('message' => 'Hello World!'));
}
}
See the docs on http://laravel.com/docs/views/templating