PHPackages                             slim/light - 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/light

AbandonedArchivedLibrary[Framework](/categories/framework)

slim/light
==========

Enhance Slim framework lightly.

0.1.1(12y ago)7461[1 issues](https://github.com/larrydarrelc/Slim-Light/issues)MITPHPPHP &gt;=5.3.0

Since Feb 4Pushed 11y ago1 watchersCompare

[ Source](https://github.com/larrydarrelc/Slim-Light)[ Packagist](https://packagist.org/packages/slim/light)[ RSS](/packages/slim-light/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Slim-Light
==========

[](#slim-light)

Enhance [Slim framework](http://www.slimframework.com/) *lightly*.

Features
--------

[](#features)

### Separate Routing

[](#separate-routing)

If you have *a lot of* *very long* view functions to route, your code may look very messy:

```
$app->get('/:id', function() use ($app) {
  // do somethings...
})
->name('get_book_by_id')
->conditions(array('id' => '\d+'));

$app->post('/:id', function() use ($app) {
  // do somethings...
})
->name('edit_book_by_id')
->conditions(array('id' => '\d+'));

$app->delete('/:id', function() use ($app) {
  // do somethings...
})
->name('remove_book_by_id')
->conditions(array('id' => '\d+'));

// Other view functions go on...
```

Being confused by all these tails? In `Slim-Light` you can just separate routing and view funtions registering:

```
// Routing
$app->route('get_book_by_id', '/int:id', 'GET');  // Setup all small tails in one place!
$app->route('edit_book_by_id', '/int:id', 'POST');
$app->route('remove_book_by_id', '/int:id', 'DELETE');

// Registering
$app->set('get_book_by_id', function ($id) use ($app) {
  // do somethings...
});
$app->set('edit_book_by_id', function ($id) use ($app) {
  // do somethings...
});
$app->set('remove_book_by_id', function ($id) use ($app) {
  // do somethings...
});
```

### Class Based Resource

[](#class-based-resource)

Tried of writing restful like API? Resource object can ease you pain:

```
class MovieResource extends \Slim\Light\ResourceController
{
    public function get($id) {
        echo $id;
    }

    public function update($id) {
        echo $id;
    }

    public function remove($id) {
        echo $id;
    }

    public function get_all() {
        echo 'All movies.';
    }

    public function create() {
        echo 'Create a movie.';
    }
}

// Setup all in one line!
$app->resource('movie', '/movie', new MovieResource());
```

Contribution
------------

[](#contribution)

Feel free to open an issue! Waiting for your pull request &lt;3

License
-------

[](#license)

MIT, head over [LICENSE](LICENSE) for more informations.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4483d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f30090b3885da70a173903c957e6702168c960614bd0b145100456bd987f62c?d=identicon)[ld](/maintainers/ld)

---

Top Contributors

[![larrydarrelc](https://avatars.githubusercontent.com/u/6292161?v=4)](https://github.com/larrydarrelc "larrydarrelc (9 commits)")[![bcho](https://avatars.githubusercontent.com/u/1975118?v=4)](https://github.com/bcho "bcho (1 commits)")

---

Tags

slimphpenhancemnt

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[slim/twig-view

Slim Framework 4 view helper built on top of the Twig 3 templating component

3708.0M210](/packages/slim-twig-view)[gotzmann/comet

Modern PHP framework for building blazing fast REST APIs and microservices

68816.2k1](/packages/gotzmann-comet)[brandembassy/slim-nette-extension

19190.2k](/packages/brandembassy-slim-nette-extension)[vesp/core

Vesp core library to make backend simple

243.8k5](/packages/vesp-core)

PHPackages © 2026

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