Select Page

Over the last few years I’ve had great experiences and results using Symfony2 to build web apps. It was the first framework I really explored and used to any extent and the focus on MVC really helped my progression as a developer.

For a project I needed to decide whether to use what I knew (Silex/Symfony2) or branch out and try something new. Symfony2 is quite heavy, so I wanted something a little lighter, but not so light that it lacks power. It also needed to be flexible enough to extend and scale as needed. It needed to be modern, actively maintained and follow the MVC pattern.


I looked at Yii , CakePHP and thought about Zend for a second, but then came across Laravel. It uses some Symfony2 components and has its own ORM and templating engine called Blade.

I’d run into issues before with some templating solutions being too restrictive, so was happy to see its was easy to extend Blade:


Blade::extend(function($value) {
    return preg_replace('/{?(.+)?}/', '<?php ${1} ?>', $value);

Perhaps not quite as nice as writing a Twig extension, but it will do the job.

Laravel also has its own dependency injection container called Illuminate, which from this guys tests seemed to be decent enough.

Building RESTful API’s also seems pretty straightforward.

One negative aspect a few people raised was Laravels heavy use of static method calls, and how this would impact on writing unit tests. There docs do have a basic example of using PHPUnit,  but I’ll have to see how this goes, as I really want this app to have 100% coverage.


I will continue to post my experiences with Laravel as I go.


%d bloggers like this: