PHP code example of aminos / codeigniter-blade
1. Go to this page and download the library: Download aminos/codeigniter-blade library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aminos / codeigniter-blade example snippets
class Home extends BaseController {
public function index() {
/** load blade helper function */
helper('blade');
/*
* create {view_name}.blade.php inside Views folder
*/
$data = ['key' => 'value'];
return blade('view_name', $data);
}
}
class Home extends BaseController {
public function index() {
/** load blade service */
$blade = \Config\Services::blade(); // or service('blade')
/*
* create {view_name}.blade.php inside Views folder
*/
$data = ['key' => 'value'];
return $blade->render('view_name', $data);
}
}