/ PHP

How to Install Slim Framework on Windows 10 Localhost

How to Install Slim Framework on Windows 10 Localhost

Slim Framework is the PHP Micro Framework Which Helps us Build the Web Applications and RESTFUL APIs in PHP.

Light Weight PHP Framework recently we use this on our web applications Very easy to Create a Restful API’s.

In our Upcoming Video Series, I Will Explain about its  Usage, Setup, and Implementation.

In this Post, we are going to see about Steps to Install Slim on Windows 10 Localhost

How to Install Slim Framework on Windows 10?

Requirements

  • PHP composer = https://getcomposer.org/
  • Wamp Server (Localhost Environment)
  • Build in windows command prompt

Steps to Install Slim on Windows 10

  • Install PHP Composer
  • Run the Wamp server
  • Create New Folder for Slim Framework in WWW Folder on Wamp
  • Open Windows Command Prompt
  • Open a Folder that we Created on WAMP server for Slim Framework
  • Now Run this Below Command Line to Install Slim Framework Via Composer
composer require slim/slim:"^3.0"
  • That’s all successfully we Install the Slim on Windows 10
  • Now Write Hello World Program in Slim Framework
  • Open Installed Folder in WAMP
  • Create index.php in that folder
  • Copy the Below code and Paste it on index.php & save it
<?php
 
require "vendor/autoload.php";

$app = new Slim\App();

$app->get("/",function(){

echo "Hello World";
});

$app->run();

?>
  • Open the Browser and run the Slim Framework on WAMP Server

localhost/INSTALLEDFOLDERNAME

Install Slim Framework on Windows 10

How to Guides