Simple CodeIgniter framework website
You may find Space Prospection website online and compare it with your own copy.
Space Prospection is simple website built completely in CodeIgniter framework. Content and purpose of this website is completely made up, I just want to demonstrate building website in MVC structure and other OOP related skills and help other Web Developers teaching themselves this awesome PHP framework.
Currently home page looks like this, but have in mind that this image might stay few commits behind.
PHP version 7.1 or newer is recommended. Website uses SQLite3 database, therefore install/enable it in your php.ini
settings and restart your server. Strongly recommended to use SQLite Studio to browse and edit SQLite database.
# Check if your machine is setup properly
composer run check
# Setup project
composer run setup
# Run website
composer run serve
When installing on a server just change following:
- Navigate to the config.php and set
$config['base_url']
to your own path. - Navigate to the email.php and add your own email messaging credentials.
- Navigate to the constants.php and set global
EMAIL_ADMIN
where all emails would be sent to from contact form. - Navigate to the index.php and change global variable
ENVIRONMENT
fromdevelopment
toproduction
.
Please note that you need PHPUnit installed on your machine. Running apt-get install phpunit
will do the work for Linux-based operating systems. All unit tests are stored inside application/tests folder.
# Run all tests
composer run autotest
Running all tests will check following:
- Coding standard with PHP_CodeSniffer
- Unit tests with PHPUnit
Unit tests coverage report will be created in coverage folder.