Open AyhanALTINOK opened 5 years ago
Hi @AyhanALTINOK Please let me know the procedure of how you implemented it and the code.
Thanks
Hi @FayazK I have added the following code to the "config/autoload.php" file
$autoload['libraries'] = array('theme');
$autoload['helper'] = array('theme','url');
$autoload['config'] = array('theme');
I have installed "duncan3dc/blade" composer
I have added the following code to the "config/theme.php" file
$config['blade_engine'] = FCPATH.'vendor/autoload.php';
$config['theme_directory'] = FCPATH.'application/views/'.DIRECTORY_SEPARATOR;
$config['theme_default'] = '';
I updated my welcome.php controller file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
$view_data = array(
'page_title' => 'Homepage',
'description' => 'description content',
'title' => 'Trial',
'content' => 'Hello world.'
);
$this->theme->display('welcome',$view_data);
}
}
?>
I updated my welcome.blade.php view file
<DOCTYPE html>
<html lang="en">
<head>
<title>{{$page_title}} - CodeIgniter</title>
<meta name="description" content="{{$description}}">
</head>
<body>
<h1>{{$title}} </h1>
<p>{{$content}}</p>
</body>
</html>
thanks
hi @AyhanALTINOK
Can you please uninstall and reinstall the composer blade package
use version 4.0.* or earlier
Thanks
Thank you for your help.
CodeIgniter 3.1.9 version help me