How to Install or Step-Up PHP Slim Framework

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs , Creating Restful API using slim is very easy and quick , this post is intended to give you a quick overview how to install slim framework step by step.

System Requirements

  1. Web server with URL rewriting
  2. PHP 5.5 or newer

Installing Wamp

WAMP Stands for windows Apache MySQL PHP you can download .exe file at ( ) download according to your system specification (32bit ot 64bit)

After Installing Wamp

"wamp\bin\php\php5.4.12\php.ini" and

In both the files replace "extension=php_openssl.dll" with ";extension=php_openssl.dll" .

Installing Composer

It is recommended to installing slim using Composer , to download and install composer just follow below steps

Download Composer at ( )

Install the composer

Setting Environment Variable

Right click on mycomputer and the properties 

Just Follow the below steps to open system variable dialog box

In the system variable dialog

1.Set environment variable for php  : Go to installed directory of php upto bin  folder ( for ex in my case it is "C:\wamp\bin\php\php5.5.35" ) append this in varaible value with by prefixing it with ";"
Ex  ";C:\wamp\bin\php\php5.5.35"

Similarly go to installed directory of composer (for ex in my case it is "C:\ProgramData\ComposerSetup\bin"  append this in varaible value with by prefixing it with ";"
Ex   ";C:\ProgramData\ComposerSetup\bin"

Command Line

Navigate into your project’s root directory and execute the bash command shown below

Open command prompt firstly navigate the directory where you want to load slim framework using "cd" command

Execute the composer command
composer require slim/slim "^3.0"

No comments:

Post a Comment