Workouts with Slim 3 - part 5- Action controllers



Since Apr 04, 2016 1 Posts

It is always a bad idea injecting the container instead of real controller dependencies. Isn't better injecting to the user controller only what it needs?

Injecting the container , tecnically makes your controller depending on the whole application. This makes mocking for tests a really hard task.

This is just a service locator pattern.

Since Jul 23, 2016 1 Posts

Thank you for the article. Where should we place our controller files?

zooboole Since Jan 22, 2015 109 Posts

Sure, something I need to review

Taslima Kabir Since May 26, 2017 2 Posts

Hi There, I am very new to php framework. Curretly I have learned very little of Slim Framework. I am kind of stuck to show some common widget/modules to every page. Suppose I have four Controllers for severing four different router point.One for blog. one for forum.... But I like to show new blog post on sidebar on every controllers like blog,forums. What's the best way to approach it.

Taslima Kabir Since May 26, 2017 2 Posts

Hi There, I am very new to php framework. Curretly I have learned very little of Slim Framework. I am kind of stuck to show some common widget/modules to every page. Suppose I have four Controllers for severing four different router point.One for blog. one for forum.... But I like to show new blog post on sidebar on every controllers like blog,forums. What's the best way to approach it.