How to install Slim Framework for php ?

admin/ July 9, 2016/ Linux/ 0 comments

How to install Slim Framework for php ?

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.

Step 1-: Install Composer

curl -sS https://getcomposer.org/installer | php 
mv composer.phar /usr/local/bin/composer
sudo chmod 0755 /usr/local/bin/composer

Step 2-: Install Slim Framework

composer create-project slim/slim-skeleton [APPNAME]
chmod [APPNAME]/logs/app.log

Addition Step-:

cd /var/www/html/
composer create-project slim/slim-skeleton SlimTest

Output-: Open Browser
visit

http://localhost/SlimTest/public/
or

http://<serverip >/SlimTest/public/

or

cd AppName
php -S 0.0.0.0:8888 -t public public/index.php

Visit
http://localhost:8888 or http://<server ip>:8888

Leave a Reply