PHPackages                             kolyadin/slim-subdir - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. kolyadin/slim-subdir

ActiveLibrary[HTTP &amp; Networking](/categories/http)

kolyadin/slim-subdir
====================

Slim Framework, a PHP micro framework

2.4.5(11y ago)024MITPHPPHP &gt;=5.3.0

Since Apr 14Pushed 11y ago1 watchersCompare

[ Source](https://github.com/kolyadin/slim-subdir)[ Packagist](https://packagist.org/packages/kolyadin/slim-subdir)[ Docs](http://github.com/codeguy/Slim)[ RSS](/packages/kolyadin-slim-subdir/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (24)Used By (0)

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

[](#slim-framework)

[![Build Status](https://camo.githubusercontent.com/ea6454fc108c2bf0ff57da4ca6a0cca6d44dd6801cee3b51d6997b1a91d0b521/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f636f64656775792f536c696d2e706e673f6272616e63683d6d6173746572)](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
- Resource Locator and DI container
- 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/#Installation)

### 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]

```

Additionally, make sure your virtual host is configured with the AllowOverride option so that the .htaccess rewrite rules can be used:

AllowOverride All

#### Nginx

[](#nginx)

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

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

```

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

#### HipHop Virtual Machine for PHP

[](#hiphop-virtual-machine-for-php)

Your HipHop Virtual Machine configuration file should contain this code (along with other settings you may need). Be sure you change the `ServerRoot` setting to point to your Slim app's document root directory.

```
Server {
    SourceRoot = /path/to/public/directory
}

ServerVariables {
    SCRIPT_NAME = /index.php
}

VirtualHost {
    * {
        Pattern = .*
        RewriteRules {
                * {
                        pattern = ^(.*)$
                        to = index.php/$1
                        qsa = true
                }
        }
    }
}

```

#### 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).

#### IIS

[](#iis)

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

```

```

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](http://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.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor6

6 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~40 days

Recently: every ~62 days

Total

22

Last Release

4295d ago

Major Versions

1.6.7 → 2.0.02012-09-09

PHP version history (2 changes)1.6.0PHP &gt;=5.2.0

2.0.0PHP &gt;=5.3.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1992111?v=4)[Aleksey](/maintainers/kolyadin)[@kolyadin](https://github.com/kolyadin)

---

Top Contributors

[![briannesbitt](https://avatars.githubusercontent.com/u/170745?v=4)](https://github.com/briannesbitt "briannesbitt (31 commits)")[![adriencarbonne](https://avatars.githubusercontent.com/u/871145?v=4)](https://github.com/adriencarbonne "adriencarbonne (25 commits)")[![bobdia](https://avatars.githubusercontent.com/u/263772?v=4)](https://github.com/bobdia "bobdia (19 commits)")[![jwpage](https://avatars.githubusercontent.com/u/52687?v=4)](https://github.com/jwpage "jwpage (17 commits)")[![gmanricks](https://avatars.githubusercontent.com/u/1296664?v=4)](https://github.com/gmanricks "gmanricks (15 commits)")[![pine3ree](https://avatars.githubusercontent.com/u/3229979?v=4)](https://github.com/pine3ree "pine3ree (8 commits)")[![KampfCaspar](https://avatars.githubusercontent.com/u/274391?v=4)](https://github.com/KampfCaspar "KampfCaspar (8 commits)")[![mcuelenaere](https://avatars.githubusercontent.com/u/1682432?v=4)](https://github.com/mcuelenaere "mcuelenaere (7 commits)")[![silentworks](https://avatars.githubusercontent.com/u/79497?v=4)](https://github.com/silentworks "silentworks (7 commits)")[![fgalassi](https://avatars.githubusercontent.com/u/49930?v=4)](https://github.com/fgalassi "fgalassi (6 commits)")[![ziadoz](https://avatars.githubusercontent.com/u/645637?v=4)](https://github.com/ziadoz "ziadoz (6 commits)")[![jeremykendall](https://avatars.githubusercontent.com/u/288613?v=4)](https://github.com/jeremykendall "jeremykendall (6 commits)")[![hexa2k9](https://avatars.githubusercontent.com/u/118494?v=4)](https://github.com/hexa2k9 "hexa2k9 (5 commits)")[![neverender](https://avatars.githubusercontent.com/u/111049?v=4)](https://github.com/neverender "neverender (5 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (5 commits)")[![ptarjan](https://avatars.githubusercontent.com/u/40143?v=4)](https://github.com/ptarjan "ptarjan (4 commits)")[![MatthewCallis](https://avatars.githubusercontent.com/u/67945?v=4)](https://github.com/MatthewCallis "MatthewCallis (4 commits)")[![dongilbert](https://avatars.githubusercontent.com/u/718028?v=4)](https://github.com/dongilbert "dongilbert (4 commits)")[![renatko](https://avatars.githubusercontent.com/u/3335954?v=4)](https://github.com/renatko "renatko (4 commits)")[![shello](https://avatars.githubusercontent.com/u/30915?v=4)](https://github.com/shello "shello (4 commits)")

---

Tags

restroutermicroframework

### Embed Badge

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

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

###  Alternatives

[lukasdev/drouter

Um sistema simplista de roteamento, com o intuito de ser utilizado em aplicacoes web pequenas e webservices REST

172.6k](/packages/lukasdev-drouter)

PHPackages © 2026

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