Boilerplate for web application development with PHP.
- Multilingual
- Role based access control
- CMS
Create a database.
Copy the config.examle.php in app/config and name it config.php.
Open it with a text editor and make changes as you fancy, e.g. enter the login information for the database(s) used. Do not forget to choose a install passcode that is not the default one.
In your project directory do:
composer install
Create these folders and make them writeable to PHP:
- public/upload
- app/res/tpl/cache
Copy the _ htaccess file in public and name it .htaccess.
Point your browser to http://example.com/install and follow the instructions.
Start writing template, models and controllers until you have a shiny new application handy.
The following is more of a note to myself.
I use Composer.
The following requires you to have composer.phar installed and in your $PATH. There must also already be a composer.json file in your project directory.
On your command line do this to install your project:
cd /path/to/project
composer install
On your command line do this to update your project:
cd /path/to/project
composer update
Do a composer self-update from time to time.
I enjoy RedBeanPHP as a ORM.
Note: Cinnebar uses RedBeanPHP Version 4 now. The current dev-master could be loaded via composer, but public/index.php will require it from the lib folder instead.
Make a copy of setup.example.php in tests/ and name it setup.php. Open that file and edit the login information for a test database. Do not use your production database for testing, because the database will be nuked before testing.
I use PHPUnit.
On your command line do this to run all tests:
cd /path/to/project/tests
../vendor/bin/phpunit .
Feel free to visit sah-company.com. Nothing there, though.
- Write complete documentation for installation