PHPackages                             revuls/slimmvc - 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. revuls/slimmvc

ActiveFramework[Framework](/categories/framework)

revuls/slimmvc
==============

MVC for the PHP microframework Slim

0105PHP

Since Aug 25Pushed 12y ago1 watchersCompare

[ Source](https://github.com/thorbenschmitt/SlimMVC)[ Packagist](https://packagist.org/packages/revuls/slimmvc)[ RSS](/packages/revuls-slimmvc/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

SlimMVC
=======

[](#slimmvc)

SlimMVC is the easiest and flexible way to create your PHP application using a MVC pattern. SlimMVC use the PHP microframework [Slim Framework](http://www.slimframework.com/) and use the best practices collected in the slim community.

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

[](#getting-started)

1. Get or download the project
2. Install it using Composer

Folder System
-------------

[](#folder-system)

- lib/
    - Config.php (Class to store with config variables)
    - Core.php (Singleton PDO connection to the DB)
- models/
- public/
- routers/
    - name.router.php (routes by functionalities)
- templates/

### lib/

[](#lib)

Here we have the core classes of the connection with the DB

### models/

[](#models)

Add the model classes here. We are using PDO for the Database.

Example of class:

Stuff.php

```
class Stuff {

    protected $core;

    function __construct() {
        $this->core = Core::getInstance();
    }

    // Get all stuff
    public function getAllStuff() {
        $r = array();

        $sql = "SELECT * FROM stuff";
        $stmt = $this->core->dbh->prepare($sql);

        if ($stmt->execute()) {
            $r = $stmt->fetchAll(PDO::FETCH_ASSOC);
        } else {
            $r = 0;
        }
        return $r;
    }
}
```

### public/

[](#public)

All the public files:

- Images, CSS and JS files
- index.php

### routers/

[](#routers)

All the files with the routes. Each file contents the routes of an specific functionality. It is very important that the names of the files inside this folder follow this pattern: name.router.php

Example of router file:

stuff.router.php

```
// Get stuff
$app->get('/stuff', function () use ($app) {
    echo 'This is a GET route';
});

//Create user
$app->post('/stuff', function () use ($app) {
    echo 'This is a POST route';
});

// PUT route
$app->put('/stuff', function () {
    echo 'This is a PUT route';
});

// DELETE route
$app->delete('/stuff', function () {
    echo 'This is a DELETE route';
});
```

### templates/

[](#templates)

All the Twig templates.

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

[](#how-to-contribute)

### Pull Requests

[](#pull-requests)

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

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/214333e18ef18addd5abb3ec5f09a0253d28f3845de3de35e99a25329ff0bcbe?d=identicon)[thorbenschmitt](/maintainers/thorbenschmitt)

---

Top Contributors

[![revuls](https://avatars.githubusercontent.com/u/2205808?v=4)](https://github.com/revuls "revuls (22 commits)")

### Embed Badge

![Health badge](/badges/revuls-slimmvc/health.svg)

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

###  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.7M257](/packages/laravel-dusk)[laravel/prompts

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

708181.8M593](/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)
