Slim Articles

Read the latest articles in the 'Slim' category.

Slim Twig Eloquent PHP

Using Eloquent, Twig and Slim PHP - Revisited

It’s been about one and a half years since I made my blog post Using Eloquent, Twig and Slim PHP and a lot’s changed since then but I still love using these three tools for small websites.

You can view all the code for this post here or if you’re looking for the original code from 2013 please switch to the 1.0 release.

Mitch

Eloquent Slim Twig PHP

Using Eloquent, Twig and Slim PHP

Note: See the update to this post where I've made several changes

Originally while I was writing this blog I intended to make a step by step guide to putting together three of my favourite PHP tools. After a few issues and finding out that Slim Views is now a thing I decided instead to put together a git repo so anyone can get started quickly. I will use this blog post to quickly show how it works!

*Note that this tutorial doesn’t aim to teach you Slim, Twig or Eloquent

  • It’s to show you how to use them together effectively.*

You can find the repo here: https://github.com/acoustep/slim-twig-eloquent

After following the Installation instructions you should be able to use each component as well as Eloquent validation.