https://github.com/manuelgil/ci4-template-engine
🔥 Example of template engine integration in CodeIgniter 4
https://github.com/manuelgil/ci4-template-engine
codeigniter4 template-engine
Last synced: 13 days ago
JSON representation
🔥 Example of template engine integration in CodeIgniter 4
- Host: GitHub
- URL: https://github.com/manuelgil/ci4-template-engine
- Owner: ManuelGil
- License: mit
- Created: 2022-08-07T04:59:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-01T19:10:37.000Z (over 3 years ago)
- Last Synced: 2025-01-21T02:42:44.998Z (12 months ago)
- Topics: codeigniter4, template-engine
- Language: PHP
- Homepage:
- Size: 129 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Codeigniter 4 with Template Engine
[](https://github.com/ManuelGil/ci4-template-engine/releases/tag/v1.0.0)
[](https://github.com/ManuelGil/ci4-template-engine/releases/tag/v1.0.0)
[](./LICENSE)
Example of template engine integration in CodeIgniter 4
This repository includes:
- [twig](https://github.com/ManuelGil/ci4-template-engine/tree/twig)
- [mustache](https://github.com/ManuelGil/ci4-template-engine/tree/mustache)
- [blade](https://github.com/ManuelGil/ci4-template-engine/tree/blade)
## Requirements
- [PHP 7.4](https://www.php.net/releases/7_4_0.php) or later
- [intl](http://php.net/manual/en/intl.requirements.php)
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
- json (enabled by default - don't turn it off)
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
- [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL
- xml (enabled by default - don't turn it off)
## Installation
### Copy this project
1. Clone or Download this repository
2. Unzip the archive if needed
3. Rename the folder if needed
4. Start a Text Editor (VSCode, Sublime, PHPStorm, etc)
5. Add the project folder to the editor
### Install the project
You can install this wrapper via composer with the following commands:
#### _Development_
- Required a composer installation.
```bash
$ composer install
```
- Downloading [composer.phar](https://getcomposer.org/download/).
```bash
$ sudo php composer.phar install
```
#### _Production_
- Required a composer installation.
```bash
$ composer install --no-dev --optimize-autoloader
```
- Downloading [composer.phar](https://getcomposer.org/download/).
```bash
$ sudo php composer.phar install --no-dev --optimize-autoloader
```
## Configure the project
- Copy the [`env`](./env)
file and call it `.env`.
```bash
$ cp env .env
```
- Edit the environment variables in the .env file as you need.
- Make www-data the owner to `writable` folder.
```bash
$ sudo chown www-data: writable/
```
- Start project
```bash
$ php spark serve
```
## Built With
- PHP 7.4.16 ([XAMPP](https://www.apachefriends.org/download.html))
- COMPOSER 2.1.3 ([COMPOSER](https://getcomposer.org/download/))
- CodeIgniter 4.2.3 ([COMPOSER](https://www.codeigniter.com/download))
- Visual Studio Code 1.70.0 ([VSCode](https://code.visualstudio.com/download))
- Mustache Template - Snippets & Autocomplete for VSCode 1.1.0 ([Mustache Template - Snippets & Autocomplete](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-mustache-snippets))
## Changelog
See [CHANGELOG.md](./CHANGELOG.md)
## Contributing
Thank you for considering contributing to alternative admin. The contribution guide can be found in the [CONTRIBUTING.md](./.github/CONTRIBUTING.md).
## Code of Conduct
In order to ensure that the alternate admin community is welcoming to all, please review and abide by the [CODE_OF_CONDUCT](./.github/CODE_OF_CONDUCT.md).
## Authors
- **Manuel Gil** - _Owner_ - [ManuelGil](https://github.com/ManuelGil)
See also the list of [contributors](https://github.com/ManuelGil/ci4-template-engine/contributors)
who participated in this project.
## License
This project is licensed under the MIT License - see the
[MIT](https://opensource.org/licenses/MIT) for details.