PHP Slim3 Introduction to Slim via Slimple

I would like to introduce to you my very simple slim skeleton called Slimple.

Slimple is designed to be incredibly minimalist. It has 2 dependencies (Slim and Twig-View). It is totally designed just as a bootstrap for a project. I find myself consistently having to write this bootstrap which is incredably annoying so I have just decided to open-source it. You can find the source here; https://github.com/geggleto/slimple

It provides a `StaticPageController` where you should define the pages you are going to be serving. A new function for each page; and a new Twig Template for each page.

For those who are a bit more advanced in Twig or for those who want to learn Twig you should set up Heirarchical twig templates. This is how TWIG deals with Layouts. Templates may extend from another "base" template aka Layout. This way you can set your HTML and css in a "Base" template that every page extends from. The way you do this is by defining "blocks" in your base template; an example would be a "content" block. Then every template extends from this would also have that same block and you can override what is in it.

Anyway if you have any questions or problems please open a PR on the repo!

Written by Glenn Eggleton on Sunday September 10, 2017
Permalink - Chapter: Projects