Home

Awesome

CodeIgniter App

Integrate RESTfull API, Base Model, Ion Auth module and Template module.

Features

Installtaion

add new virtual hostname on hosts file (/etc/hosts)

127.0.0.1 ci.localhost

Apache: create .htaccess.

RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|assets|robots\.txt|$)
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Nginx: please add the following to virtualhost config.

location / {
  try_files $uri $uri/ /index.php;
}

Import the SQL structure

$ mysql -u root -p app < sql/app.sql

Installtaion with Homestead

Please read Chinese Blog or refer the following steps.

Clone the project init /home/git foloder.

$ git clone https://github.com/appleboy/CodeIgniter-App.git /home/git/CodeIgniter-App

Update ~/.homestead/Homestead.yaml setting.

folders:
  - map: /home/appleboy/newProject
    to: /home/vagrant/Code
  - map: /home/git/CodeIgniter-App
    to: /home/vagrant/codeigniter-app
 
sites:
  - map: homestead.app
    to: /home/vagrant/Code/public
  - map: codeigniter.app
    to: /home/vagrant/codeigniter-app/public
 
databases:
  - homestead
  - app

Update after.sh as the following:

#!/bin/sh
 
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
 
mysql -uhomestead -psecret app < /home/vagrant/codeigniter-app/sql/app.sql

Start the virtual machine.

$ homestead up --provision

open youre browser url: http://codeigniter.app:8000

Screenshot

<img src="https://raw.githubusercontent.com/appleboy/CodeIgniter-App/master/screenshot/screenshot.png" alt="screenshot" />