PHPackages                             slim/mvc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. slim/mvc

ActiveLibrary[Framework](/categories/framework)

slim/mvc
========

Slim Framework, a PHP micro framework , Model View Controller extends

22222PHP

Since Oct 7Pushed 10y ago1 watchersCompare

[ Source](https://github.com/suryakencana/slimmvc)[ Packagist](https://packagist.org/packages/slim/mvc)[ RSS](/packages/slim-mvc/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Slim Framework
==============

[](#slim-framework)

[![Build Status](https://camo.githubusercontent.com/68c5ac8a46571afbf0628500ea3aaad1d4790a7a427ad29910b8d79d5e10d975/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f636f64656775792f536c696d2e706e67)](http://travis-ci.org/codeguy/Slim)

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. Slim is easy to use for both beginners and professionals. Slim favors cleanliness over terseness and common cases over edge cases. Its interface is simple, intuitive, and extensively documented — both online and in the code itself. Thank you for choosing the Slim Framework for your next project. I think you're going to love it.

Features
--------

[](#features)

- Powerful router
    - Standard and custom HTTP methods
    - Route parameters with wildcards and conditions
    - Route redirect, halt, and pass
    - Route middleware
- Template rendering with custom views
- Flash messages
- Secure cookies with AES-256 encryption
- HTTP caching
- Logging with custom log writers
- Error handling and debugging
- Middleware and hook architecture
- Simple configuration

Getting Started
---------------

[](#getting-started)

### Install

[](#install)

You may install the Slim Framework with Composer (recommended) or manually.

[Read how to install Slim](http://docs.slimframework.com/pages/getting-started-install)

### System Requirements

[](#system-requirements)

You need **PHP &gt;= 5.3.0**. If you use encrypted cookies, you'll also need the `mcrypt` extension.

### Hello World Tutorial

[](#hello-world-tutorial)

Instantiate a Slim application:

```
$app = new \Slim\Slim();

```

Define a HTTP GET route:

```
$app->get('/hello/:name', function ($name) {
    echo "Hello, $name";
});

```

Run the Slim application:

```
$app->run();

```

### Setup your web server

[](#setup-your-web-server)

#### Apache

[](#apache)

Ensure the `.htaccess` and `index.php` files are in the same public-accessible directory. The `.htaccess` file should contain this code:

```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

```

#### Nginx

[](#nginx)

Your nginx configuration file should contain this code (along with other settings you may need) in your `location` block:

```
try_files $uri $uri/ /index.php;

```

This assumes that Slim's `index.php` is in the root folder of your project (www root).

#### lighttpd

[](#lighttpd)

Your lighttpd configuration file should contain this code (along with other settings you may need). This code requires lighttpd &gt;= 1.4.24.

```
url.rewrite-if-not-file = ("(.*)" => "/index.php/$0")

```

This assumes that Slim's `index.php` is in the root folder of your project (www root).

Documentation
-------------

[](#documentation)

How to Contribute
-----------------

[](#how-to-contribute)

### Pull Requests

[](#pull-requests)

1. Fork the Slim Framework repository
2. Create a new branch for each feature or improvement
3. Send a pull request from each feature branch to the **develop** branch

It is very important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows me to review and pull in new features or improvements individually.

### Style Guide

[](#style-guide)

All pull requests must adhere to the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) standard.

### Unit Testing

[](#unit-testing)

All pull requests must be accompanied by passing unit tests and complete code coverage. The Slim Framework uses `phpunit` for testing.

[Learn about PHPUnit](https://github.com/sebastianbergmann/phpunit/)

Community
---------

[](#community)

### Forum and Knowledgebase

[](#forum-and-knowledgebase)

Visit Slim's official forum and knowledge base at  where you can find announcements, chat with fellow Slim users, ask questions, help others, or show off your cool Slim Framework apps.

### Twitter

[](#twitter)

Follow [@slimphp](http://www.twitter.com/slimphp) on Twitter to receive news and updates about the framework.

Author
------

[](#author)

The Slim Framework is created and maintained by [Josh Lockhart](https://www.joshlockhart.com). Josh is a senior web developer at [New Media Campaigns](http://www.newmediacampaigns.com/). Josh also created and maintains [PHP: The Right Way](http://www.phptherightway.com/), a popular movement in the PHP community to introduce new PHP programmers to best practices and good information.

License
-------

[](#license)

The Slim Framework is released under the MIT public license.

Modified Zi^^zI
---------------

[](#modified-zizi)

\\Slim\\Slim =&gt; all method Route dimasukan kedalam \\Slim\\Router \\Slim\\Slim \_\_construct ditambah $instances untuk fungsi facade ^^?

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/970a80dc23d4b8fcd6f5a96878918d4bf4cce3fc276a092b386bea7c10ba3b0c?d=identicon)[suryakencana](/maintainers/suryakencana)

---

Top Contributors

[![suryakencana007](https://avatars.githubusercontent.com/u/4660505?v=4)](https://github.com/suryakencana007 "suryakencana007 (6 commits)")[![zifactory](https://avatars.githubusercontent.com/u/5545939?v=4)](https://github.com/zifactory "zifactory (1 commits)")

### Embed Badge

![Health badge](/badges/slim-mvc/health.svg)

```
[![Health](https://phpackages.com/badges/slim-mvc/health.svg)](https://phpackages.com/packages/slim-mvc)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
