PHPackages                             matiasnamendola/slimpower-slim-example - 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. [Templating &amp; Views](/categories/templating)
4. /
5. matiasnamendola/slimpower-slim-example

ActiveLibrary[Templating &amp; Views](/categories/templating)

matiasnamendola/slimpower-slim-example
======================================

Example of slimpower-slim

v0.0.1-alpha(9y ago)06MITPHPPHP &gt;=5.3.0

Since Dec 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/MatiasNAmendola/slimpower-slim-example)[ Packagist](https://packagist.org/packages/matiasnamendola/slimpower-slim-example)[ Docs](https://github.com/matiasnamendola/slimpower-slim-example)[ RSS](/packages/matiasnamendola-slimpower-slim-example/feed)WikiDiscussions master Synced 6d ago

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

SlimPower - Slim - Example
==========================

[](#slimpower---slim---example)

[![Latest version](https://camo.githubusercontent.com/439375b7ca6f79adb988af163790f375fc725b6d73a1817ac561f75e5b95bb75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4d61746961734e416d656e646f6c612f736c696d706f7765722d736c696d2d6578616d706c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/matiasnamendola/slimpower-slim-example)[![Total Downloads](https://camo.githubusercontent.com/068cdb3d58abbffcfdcd959de17a6c6fb97b6bb3c213030ff28a98a155f3cadd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4d61746961734e416d656e646f6c612f736c696d706f7765722d736c696d2d6578616d706c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/matiasnamendola/slimpower-slim-example)

[![Latest Stable Version](https://camo.githubusercontent.com/c5e43bf3fb2db64404eb0f7e0b113e2b5d578dc9b7d66158142eb607933a4095/68747470733a2f2f706f7365722e707567782e6f72672f6d61746961736e616d656e646f6c612f736c696d706f7765722d736c696d2d6578616d706c652f76657273696f6e3f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/matiasnamendola/slimpower-slim)[![Latest Unstable Version](https://camo.githubusercontent.com/e2a26f311db864985ccd157e4f9e72512c309628722eae91706a4b3d04caf1ba/68747470733a2f2f706f7365722e707567782e6f72672f6d61746961736e616d656e646f6c612f736c696d706f7765722d736c696d2d6578616d706c652f762f756e737461626c653f666f726d61743d666c61742d737175617265)](//packagist.org/packages/matiasnamendola/slimpower-slim)[![Total Downloads](https://camo.githubusercontent.com/1f0fe291a43f6dc8c07d6fcd4de68e86d728c747e38a6e3bbb4c6eeb8a0348dc/68747470733a2f2f706f7365722e707567782e6f72672f6d61746961736e616d656e646f6c612f736c696d706f7765722d736c696d2d6578616d706c652f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/matiasnamendola/slimpower-slim)[![Monthly Downloads](https://camo.githubusercontent.com/9077954b1db7f044556f1baa0c278bd0752a22b6ecdd91798dcb6d2aa6d1bf1e/68747470733a2f2f706f7365722e707567782e6f72672f6d61746961736e616d656e646f6c612f736c696d706f7765722d736c696d2d6578616d706c652f642f6d6f6e74686c793f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/matiasnamendola/slimpower-slim)[![Daily Downloads](https://camo.githubusercontent.com/c7c9ecb4c649dc3a5a0b6738c917214a56233ed767278f0999a5427fe1faff5a/68747470733a2f2f706f7365722e707567782e6f72672f6d61746961736e616d656e646f6c612f736c696d706f7765722d736c696d2d6578616d706c652f642f6461696c793f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/matiasnamendola/slimpower-slim)[![composer.lock available](https://camo.githubusercontent.com/3c7eb7b756ac58eed08c0e6a027004bb2b5de4c5864a5dd4c3c4358b30644ec4/68747470733a2f2f706f7365722e707567782e6f72672f6d61746961736e616d656e646f6c612f736c696d706f7765722d736c696d2d6578616d706c652f636f6d706f7365726c6f636b3f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/matiasnamendola/slimpower-slim)

An extension to [Slim Framework](http://www.slimframework.com/) that allows you use to dynamically instantiated controllers with action methods wherever you would use a closure or callback when routing.

The controller can optionally be loaded from Slim's DI container, allowing you to inject dependencies as required.

Additionally, this extension implements json API's with great ease.

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

[](#installation)

Create folder /var/www/slimpower and download this repository

In terminal:

```
mkdir /var/www/slimpower
cd /var/www/slimpower
composer require matiasnamendola/slimpower-slim-example
```

Or you can add use this as your composer.json:

```
{
    "require": {
        "slim/slim": "2.*",
        "matiasnamendola/slimpower-slim-example": "dev-master"
    }
}
```

### .htaccess

[](#htaccess)

Here's an .htaccess sample for simple RESTful API's

```

    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]

```

or

```

    Header always set Access-Control-Allow-Headers "Authorization"

```

### Apache VirtualHost

[](#apache-virtualhost)

Create conf file 'slimpower.conf' in folder '/etc/apache2/sites-available' with this content:

```

    ServerAdmin     webmaster@localhost
    ServerName      dev.slimpower.com
    DocumentRoot    /var/www/slimpower
    ErrorLog        /var/log/apache2/slimpower-custom-error.log
    CustomLog       /var/log/apache2/slimpower-custom.log common
    #TransferLog    /var/log/apache2/slimpower-custom.log

        Options -Indexes
        AllowOverride AuthConfig FileInfo
        AddOutputFilterByType DEFLATE text/html
        AddOutputFilterByType DEFLATE text/css
        AddOutputFilterByType DEFLATE application/x-javascript
        AddOutputFilterByType DEFLATE image/gif

        order allow,deny
        deny from all

        order allow,deny
        deny from all

        order allow,deny
        deny from all

        Order deny,allow
        Deny from all

```

Next, copy this in terminal:

```
sudo a2ensite 000-slimpower
sudo /etc/init.d/apache2 restart
```

or

```
sudo a2ensite 000-slimpower
sudo service apache2 restart
```

Credits
-------

[](#credits)

- [Matías Nahuel Améndola](https://github.com/matiasnamendola)
- [Franco Soto](https://github.com/francosoto)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Project
-------

[](#project)

Look at [slimpower-slim](https://github.com/matiasnamendola/slimpower-slim).

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3539d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f2fff748a973d02f4bb0e09462f94bf05fc1afa31cbdb6826e33a41e6fa8d4c?d=identicon)[matiasamendola](/maintainers/matiasamendola)

---

Top Contributors

[![MatiasNAmendola](https://avatars.githubusercontent.com/u/2144218?v=4)](https://github.com/MatiasNAmendola "MatiasNAmendola (32 commits)")

---

Tags

jsonmiddlewareapiconfigslimviewcontroller

### Embed Badge

![Health badge](/badges/matiasnamendola-slimpower-slim-example/health.svg)

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

###  Alternatives

[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k148.6M670](/packages/zircote-swagger-php)[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[entomb/slim-json-api

Slim extension to implement fast JSON API's

276158.9k4](/packages/entomb-slim-json-api)[dogancelik/slim-json

JSON middleware for Slim PHP framework

4190.9k3](/packages/dogancelik-slim-json)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

16164.9k1](/packages/symfony-ux-toolkit)

PHPackages © 2026

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