https://github.com/ampmonteiro/ci4-with-twig3-template-engine
CodeIgniter 4 with Twig 3 template engine
https://github.com/ampmonteiro/ci4-with-twig3-template-engine
codeigniter4 docker mysql8 php81 twig-templates twig3
Last synced: 3 months ago
JSON representation
CodeIgniter 4 with Twig 3 template engine
- Host: GitHub
- URL: https://github.com/ampmonteiro/ci4-with-twig3-template-engine
- Owner: ampmonteiro
- Created: 2023-08-06T17:58:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-06T18:11:18.000Z (almost 2 years ago)
- Last Synced: 2025-01-19T20:28:43.056Z (5 months ago)
- Topics: codeigniter4, docker, mysql8, php81, twig-templates, twig3
- Language: PHP
- Homepage:
- Size: 375 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CodeIgniter 4 with Twig 3 template engine
## About the project?
Base on my improved version of `ci4 - Build Your First Application`:
[Original improved](https://github.com/ampmonteiro/ci4-build-your-first-App).
What was added:
- Alternative template Engine
## What was used
- php: 8.1
- mysql: 8
- Docker
- CodeIgniter: 4.3.6
- Twig: 3.6.1 -> [more about](https://twig.symfony.com/)## side by side template code (Twig vs Vanilla Ci4 template engine)

## image of the App

## Editor and Recommend extensions
- Editor: [VS Code](https://code.visualstudio.com) (By Microsoft)
- [PHP Intelephense](https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client) (By Ben Mewburn)
- [PHP Namespace Resolver](https://marketplace.visualstudio.com/items?itemName=MehediDracula.php-namespace-resolver) (By Mehedi Hassan)
- [PHP Awesome Snippets](https://marketplace.visualstudio.com/items?itemName=hakcorp.php-awesome-snippets) (By HakCorp)
- To better developement it is taked advantages of this two wonderfull vscode extensions:
- [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) (By Microsoft): to manage docker containers in vs code
- [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) (By Microsoft): to use vscode inside of the container.- [TWIG pack](https://marketplace.visualstudio.com/items?itemName=bajdzis.vscode-twig-pack) (By Bajdzis)
## Setup (using docker without compose)
php image: read the Dockerfile
mysql image in terminal:
```bash
docker run --name db_ci \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_DATABASE=ci4 \
-e MYSQL_USER=dev \
-e MYSQL_PASSWORD=secret \
-dp 3306:3306 mysql;
```