slimphp-REST-starter
Starter REST-Application written in PHP with the Slim 3 Framework, (*1)
Prerequisites
PHP
- Minimum: PHP version 5.6
- Recommended: PHP version 7.1
Composer
Composer is a dependencies manager for PHP on a per-project basis., (*2)
Get Composer from their website.
Follow the installation guide in the "Getting Started" section. For further information about
what composer is, please read the docs on their page., (*3)
After installation, for commands, you can use either the composer.phar file in the project directory - if composer not globally installed - , or you
can work directly with composer - if globally installed on your machine., (*4)
Globally installed on system:, (*5)
> composer ...
or downloaded composer.phar file, (*6)
> composer.phar ...
In the following instructions we will use composer globally installed!, (*7)
Installation
Once you`ve installed composer, the starter project can be downloaded over composer., (*8)
Root to the directory where you want to install the project, (*9)
Install the starter project with following command:
```, (*10)
composer creae-project "burtscherflorian/slimphp-rest-starter:*" [your-application-name]
```
Replace [your-application-name] with the desired directory name for your new application., (*11)
Root to the directory [your-application-name] and run composer install, to require all dependencies inside your slim application, (*12)
> composer install
To the end you have to generate the autoload files with this command:, (*13)
> composer dump-autoload -o
Now you are ready for REST!, (*14)
Happy Coding!