PHPackages                             cruptus/slim - 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. cruptus/slim

ActiveProject[Framework](/categories/framework)

cruptus/slim
============

Custom Slim 3 Framework

06[2 issues](https://github.com/cruptus/slim/issues)PHP

Since Dec 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/cruptus/slim)[ Packagist](https://packagist.org/packages/cruptus/slim)[ RSS](/packages/cruptus-slim/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Structure d'un projet Slim 3
============================

[](#structure-dun-projet-slim-3)

Auteur : Elbaz Jérémie

Pre-requis
----------

[](#pre-requis)

- Serveur Web avec le mode rewrite
- PHP7
- Composer

Installation
------------

[](#installation)

```
composer install
```

> ATTENTION : Le serveur web doit pointer sur le dossier public

Fonctionnalité
--------------

[](#fonctionnalité)

- Routing
- Controllers
- Système de rendu avec Twig
- Erreur 404
- CSRF
- Database
- Fichier de configuration
- Validation / Model
- Debug bar (Seulement en mode developpement)
- Session

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

[](#documentation)

### Model

[](#model)

Pour redefinir les fields dans les models (exemple : Attribut name)

```
class User extends Model {
    public function getNameAttribute($value){
        return ucfirst($value); // Retourne le nom en majuscule
    }
}

$user = User::all()->first();
echo $user->name; // Le nom sera en majuscule
```

Pour plus d'information : [Laravel Eloquent](https://laravel.com/docs/5.3/eloquent-mutators "Lien de laravel eloquent")

### Validation

[](#validation)

Vérifier si un utilisateur est valid

```
class User extends Model {
    protected $fillable = ['name'];

    public function rules()
    {
        $this->validator = v::attribute('name', v::stringType()->length(6,32));
    }
}
$user = new User(['name' = 'toto']);
$user->isValid(); // return false

$user = new User(['name' = 'tototo']);
$user->isValid(); // return true
```

Pour plus d'information : [Respect/Validation](https://github.com/Respect/Validation)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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://avatars.githubusercontent.com/u/16649914?v=4)[cruptus](/maintainers/cruptus)[@cruptus](https://github.com/cruptus)

---

Top Contributors

[![cruptus](https://avatars.githubusercontent.com/u/16649914?v=4)](https://github.com/cruptus "cruptus (16 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/dusk

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

1.9k39.6M293](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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