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

<?php
$app = new \Slim\Slim();
$app->get('/hello/:name', function ($name) {
    echo "Hello, $name";
});
$app->run();
Swag! We have some. Shop Now

Download & Install

We recommend you install the Slim Framework with the Composer dependency manager. Run this bash command in your project's root directory to download and install the latest stable version into your project's vendor/ directory.

composer require slim/slim

Next, require the Composer autoloader into your PHP application.

<?php
require 'vendor/autoload.php';

Not using Composer?

Download ZIP Archive

Features

Router

Slim provides a powerful router that maps route callbacks to specific HTTP request methods and URIs. It supports route segment parameters and pattern matching.

Middleware

Build your application with custom concentric middleware to tweak the HTTP request and response objects before and after your Slim app runs.

HTTP

Slim has easy-to-use request and response abstractions that let you inspect and manipulate HTTP messages' method, status, URI, headers, cookies, and body.

Sessions

Slim provides first-class session support. It persists session data using industry standard encryption. Slim also enables "flash" messages across requests.

Caching

Slim provides helper methods that make client-side HTTP caching easier. It helps you work with the Expires, Last-Modified, and ETag headers.

Crypto

Slim has super-secure cryptography using military-grade encryption. Slim uses your unique key to encrypt session and cookie data before persisting data to disk.

Latest News

Slim 3 Beta 1

We have tagged beta 1 of Slim 3 and have started the journey of releasing the first stable version of 3.0. We have also started work on the new documentation.

Older News

Subscribe with RSS

Newsletter

Don't have Twitter? Join our newsletter and receive one email a week (at most) with the latest Slim Framework news, release announcements, and security updates. We hate spam, and we'll respect your inbox. You can unsubscribe at any time.

Email Archives

Chat on IRC

The official Freenode IRC channel is #slimphp. You can chat with other Slim Framework developers to share code or troubleshoot tricky issues. My nick is codeguy if you have questions or need assistance in the IRC channel.

Visit the IRC Channel

Read real-time IRC logs on BotBot.me

Follow @slimphp on Twitter