Why Laravel instead of Yii?


It's been a while since I've actually developed PHP. In my latest research, about two years ago, I did not hear much about Laravel , while the Yii was leading some of the framework to be chosen for new projects.

Anyway, my question can be asked like this:


What reasons, in the most objective way, can lead a developer to choose Laravel instead of Yii?

Alternatively, the answers might be to the question:


What reasons, in the most objective way, can cause a developer to not choose Yii as a framework?


  • I'm not looking for opinions like "I liked X more than Y" but rather relevant technical information.
  • I'm not asking which framework I should use, I just want to try to extract from the PHP architects here the reasons that led them to choose Laravel.
  • I know that it is difficult to compare frameworks or any software, but there must be some more concrete and objective reason for this choice, or not.
  • asked by anonymous 14.01.2014 / 15:48

    3 answers



    Laravel's greatest advantage over Yii lies in the learning curve. Laravel is a much simpler framework to learn, although it contains all the features common to any WEB project. Also, Laravel has a friendlier and clearer documentation than Yii. These two factors can already leverage a good deal of community for Laravel, which means having more people to help you, more tutorials, more people contributing to the framework or libraries / plugins.

    In a second perspective is the fact that Laravel has been developed as a "meta framework". Using Composer, it has some of its own libraries, the Illuminate, and is used by many community libraries, such as Symfony libraries, for example. Thus, we can decouple the parts we want from Laravel or even use other libraries of our choice. Also, because third-party libraries are in use, it's up to third parties to maintain it, giving Laravel a faster / faster bugfix cycle.

    14.01.2014 / 20:25

    I do not know Yii very well, just a look or other in the code, but I will cite here the positive points that are usually decisive in choosing Laravel.

    • Elegant Syntax - Laravel's syntax is pretty and expressive, it follows a bit of Ruby's syntax philosophy, where code should get a bit closer to written language.
    • Solid Object Oriented Principles - Modern features such as package management and dependencies via composer , IoC among others make the Framework modern, robust and easy to maintain.
    • Incredible Community - You can get help about Laravel on various channels like Forums, Documentation and communities like this. If you join the #laravel irc channel now you can get virtually instant help on any aspect of the Framework.
    • Abundant Learning Resources - You'll find dozens of recently written e-books on Laravel, with the most different approaches to learning, you can still count on resources such as Laracasts , which is a portal specialized in teaching about the Laravel world.
    • Constant Enhancement - Laravel is updated with absurd frequency, bringing new patches and features.
    • Learning Curve - The Learning Curve is very small compared to other large frameworks such as Symfony or Zend Framework, just play for an hour in the Laravel documentation and you will no longer want to drop.

    You can find an overview of why Laravel is being adopted in this link , which was written in version 3 but still valid as a starting point.

    14.01.2014 / 16:14

    I sincerely enjoy both frameworks. I prefer to use Laravel on medium projects, like websites and portals. But when the subject is big project, like big systems, there we go from Yii! Ok, Laravel has Eloquent, but you can not compare it to the Yii Active Record which is much more complete.

    Laravel is more elegant without a doubt, but Yii is much more complete.

    09.04.2015 / 01:01