https://github.com/kenjis/codeigniter-restserver-with-ci-phpunit-test
https://github.com/kenjis/codeigniter-restserver-with-ci-phpunit-test
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kenjis/codeigniter-restserver-with-ci-phpunit-test
- Owner: kenjis
- Created: 2015-08-28T07:48:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-28T11:17:39.000Z (over 10 years ago)
- Last Synced: 2025-02-26T13:39:33.776Z (11 months ago)
- Language: PHP
- Size: 367 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CodeIgniter Composer Installer
[](https://packagist.org/packages/kenjis/codeigniter-composer-installer) [](https://packagist.org/packages/kenjis/codeigniter-composer-installer) [](https://packagist.org/packages/kenjis/codeigniter-composer-installer) [](https://packagist.org/packages/kenjis/codeigniter-composer-installer)
This package installs the offical [CodeIgniter](https://github.com/bcit-ci/CodeIgniter) (version `3.0.*`) with secure folder structure via Composer.
You can update CodeIgniter system folder to latest version with one command.
## Folder Structure
```
codeigniter/
├── application/
├── composer.json
├── composer.lock
├── public/
│ ├── .htaccess
│ └── index.php
└── vendor/
└── codeigniter/
└── framework/
└── system/
```
## Requirements
* PHP 5.3.2 or later
* `composer` command (See [Composer Installation](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx))
* Git
## How to Use
### Install CodeIgniter
```
$ composer create-project kenjis/codeigniter-composer-installer codeigniter
```
Above command installs `public/.htaccess` to remove `index.php` in your URL. If you don't need it, please remove it.
And it changes `application/config/config.php`:
~~~
$config['composer_autoload'] = FALSE;
↓
$config['composer_autoload'] = realpath(APPPATH . '../vendor/autoload.php');
~~~
~~~
$config['index_page'] = 'index.php';
↓
$config['index_page'] = '';
~~~
#### Install Translations for System Messages
If you want to install translations for system messages:
```
$ cd /path/to/codeigniter
$ php bin/install.php translations 3.0.0
```
#### Install Third Party Libraries
[Codeigniter Matches CLI](https://github.com/avenirer/codeigniter-matches-cli):
```
$ php bin/install.php matches-cli master
```
[CodeIgniter HMVC Modules](https://github.com/jenssegers/codeigniter-hmvc-modules):
```
$ php bin/install.php hmvc-modules master
```
[Modular Extensions - HMVC](https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc):
```
$ php bin/install.php modular-extensions-hmvc codeigniter-3.x
```
[Ion Auth](https://github.com/benedmunds/CodeIgniter-Ion-Auth):
```
$ php bin/install.php ion-auth 2
```
[CodeIgniter3 Filename Checker](https://github.com/kenjis/codeigniter3-filename-checker):
```
$ php bin/install.php filename-checker master
```
### Run PHP built-in server (PHP 5.4 or later)
```
$ cd /path/to/codeigniter
$ php -S localhost:8000 -t public/ bin/router.php
```
### Update CodeIgniter
```
$ cd /path/to/codeigniter
$ composer update
```
You must update files manually if files in `application` folder or `index.php` change.
## Reference
* [Composer Installation](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx)
* [CodeIgniter](https://github.com/bcit-ci/CodeIgniter)
* [Translations for CodeIgniter System](https://github.com/bcit-ci/codeigniter3-translations)
## Related Projects for CodeIgniter 3.0
* [Cli for CodeIgniter 3.0](https://github.com/kenjis/codeigniter-cli)
* [CI PHPUnit Test](https://github.com/kenjis/ci-phpunit-test)
* [CodeIgniter Simple and Secure Twig](https://github.com/kenjis/codeigniter-ss-twig)
* [CodeIgniter Doctrine](https://github.com/kenjis/codeigniter-doctrine)
* [CodeIgniter Deployer](https://github.com/kenjis/codeigniter-deployer)
* [CodeIgniter3 Filename Checker](https://github.com/kenjis/codeigniter3-filename-checker)