-
Couldn't load subscription status.
- Fork 11
Open
Description
Nice way to add MVC pattern to a Slim application. cheers!
I would like to run Slim middleware using this approach.
In a regular slim application, one would write
$app = new \Slim\Slim();
$app->add(new \AllCapsMiddleware());
$app->run();
To achieve this in Slim-MVC
I tweaked Router.php processCallback
$class = new $class();
$class->add(new \Slim\Middleware\ContentTypes());
$class->runMiddleware();
Controller.php
public function runMiddleware(){
$this->middleware[0]->call();
}
I am wondering if there is a better approach?
Metadata
Metadata
Assignees
Labels
No labels