There's been an article circulating in the PHP community titled

Why You Should Not Worry If You Are Using Laravel

submited by
Style Pass
2021-06-09 03:30:05

There's been an article circulating in the PHP community titled "Why You Should Not Use Laravel". Having over 15 years of professional experience with PHP and many frameworks such as the author, I also have plenty of valid input for this.

I think the title is thought-provoking but misguided and potentially disingenuous. The author points out that "Laravel is Not PHP" and "Don't Use an ORM" to support its title.

First, I disagree that Laravel isn't PHP. I would argue that Laravel very much takes advantage of many of PHP's core features, including some from the SPL. If you're curious enough, you'll find that these features can be leveraged to your advantage. I also disagree that Laravel is "syntactic sugar". If he's trying to say that the code written in Laravel doesn't look like the PHP written decades ago, I'll give him that. Laravel definitely embraces what I would describe as "modern PHP practices". Especially because it uses a lot of features from the SPL, Composer is at the core of it, and even introduces multiple paradigms such as some functional programming. Laravel is open-minded in the sense that it looks at making coding more simple and more stable, but also allowing developers the flexibility to adapt the framework for different use cases.

The only true "syntactic sugar" in Laravel is the templating language, which really isn't unique to Laravel. Smarty, a very popular PHP templating engine before Laravel existed, has been around for over 20 years–20 years! And with similar "syntactic sugar". Templating engines aren't even unique to the PHP ecosystem. There's practically a templating engine for every major language, Node, ASP.NET, Ruby on Rails, and others.

Leave a Comment