PHPackages                             benmajor/slim3-controller - 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. benmajor/slim3-controller

ActiveSlim3-extension[Framework](/categories/framework)

benmajor/slim3-controller
=========================

Adds controller support for the Slim3 framework.

1.0.0(6y ago)119MITPHPPHP &gt;=5.3.0

Since Sep 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/benmajor/slim3-controller)[ Packagist](https://packagist.org/packages/benmajor/slim3-controller)[ Docs](https://github.com/benmajor/slim3-controller)[ RSS](/packages/benmajor-slim3-controller/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Slim 3 Controller
=================

[](#slim-3-controller)

Slim 3 ControllerThis package adds controller support to the Slim 3 framework. This can be particularly useful when building MVC applications using Slim and the native Slim Twig View extension.

### Installation:

[](#installation)

Installation can be achieved via Composer as follows:

```
composer require benmajor/slim3-controller
```

### Usage:

[](#usage)

**For the purposes of this documentation, all file references are defined relative to the root in which Slim3 is installed.**

You should start by extending the `Controller` class within your own project to add custom functionality for the project. Below is a simple example of an custom Controller (notice the use of namespacing):

/controllers/Contact.php:

```
