I like using plain PHP + PDO MySQL. I structure it so almost all files contain a single function/MySQL query, with very little dependencies. I already know how to implement core functionalities when needed (e.g. CSRF, user permissions). Why should I consider Laravel if plain PHP seems to work excellent in my case (been able to maintain the same codebase for over 9 years without issues, can quickly create a new app if…
For me, its about the higher level things included. I don't want to write a queue, event system, or cache layer again.
Laravel 9
51–60 of 262 posts
Re: Laravel 9
#52I like using plain PHP + PDO MySQL. I structure it so almost all files contain a single function/MySQL query, with very little dependencies. I already know how to implement core functionalities when needed (e.g. CSRF, user permissions). Why should I consider Laravel if plain PHP seems to work excellent in my case (been able to maintain the same codebase for over 9 years without issues, can quickly create a new app if…
Likewise, when a new developer arrives, they know exactly where to find everything because it has a place that it belongs, and they can reference the docs if they are having trouble.
It's less about the code and more about treating the project as a whole ecosystem.
Re: Laravel 9
#53Laravel and Drupal 7+ frankly ruined PHP for me. PHP as a platform is KISS and elegant, and I still admire some of its features such as built in templating, filesystem based routing, etc. But whenever I look back at Laravel, I remember how dangerous overly complex fluff with a nice logo is to a platform.
IMHO Laravel and Symfony are the best things that happened to PHP community since php5. PHP was an ugly mess of bad practices, fragmented into many outdated apps/frameworks and it was just exhausting to use. Symphony was a great improvement, but a bit too rigid and too enterprise-level for my taste. For me Laravel was honestly a breath of fresh air - finally I had something significantly more powerful than my custom…
see http://www.phpbenchmarks.com/en/comparator/framework or https://www.techempower.com/benchmarks/#section=data-r20&hw=...
Re: Laravel 9
#54Earlier quoted context omitted.
Any app without a framework ends up creating a framework of its own. Complexity isn't something to hand-wave away, but neither is the mess of include's and SQL injection risks that many "vanilla" apps become.
Same applies for frameworks. Your hoping that the framework and ecosystem is clean as to get everyone to update the framework isn't an easy task espcially when a vulnerability arises from within. It's moot. Take Wordpress for example.
The likelihood of me introducing an injection, authentication/authorization bypass or RCE vulnerability in homegrown stuff is orders of magnitude larger than in an application where at least the sensitive core parts are handled by something that's battle tested in millions of deployments and regularly audited.
Re: Laravel 9
#55I've been programming in PHP for around 5 years. I've used vanilla PHP, full featured MVC frameworks, micro frameworks and I've been working with Laravel for around 2 weeks. Worst experience ever. The more I dig into it the more I hate it.
This is my experience with Laravel as well. Laravel looks great on the surface for a simple CRUD application, but once you need to do something non-trivial with it, you need to start fighting the framework. Also I dislike the large amount of magic happening within the framework. I want to understand what the code is doing, so that I can properly debug it in an emergency. As a specific example I needed to override hal…
Re: Laravel 9
#56Laravel and Drupal 7+ frankly ruined PHP for me. PHP as a platform is KISS and elegant, and I still admire some of its features such as built in templating, filesystem based routing, etc. But whenever I look back at Laravel, I remember how dangerous overly complex fluff with a nice logo is to a platform.
You can use Laravel just for the basic wiring, integrated tooling, SQL query builder, auth, sessions, and HTTP routing. It really gets out of the way if you need to avoid features you don't like. All of the stuff I listed above are a PITA in plain PHP.
It's a really very good platform for headless PHP. The job queuing stuff is so neat it actually makes me write queueable jobs.
Combined with Lighthouse, Spatie's Stripe Webhooks library, Spatie's MediaLibrary, I've actually had fun with Laravel.
I see no reason for hate now.
Re: Laravel 9
#57Re: Laravel 9
#58Earlier quoted context omitted.
For me, its about the higher level things included. I don't want to write a queue, event system, or cache layer again.
Though for a small-ish site (say <150 users), such techniques are typically not necessary.
Re: Laravel 9
#59Could somebody say, if you are planning to embark on a new Laravel project and you have no experience, how to begin? I bought a subscription to Laracasts, and there is a "What's New in Laravel 9" series. But "Laravel from Scratch" is still on 8.
Go with the "Laravel from Scratch" on v8 to learn the basics. Then follow up with the "What's new in Laravel 9". I'll be updating to v9 this spring. Laravel has been pretty stable since they changed to semver for versioning (ie v6). The framework is fairly stable. They held off the v9 release so it could have the new Symphony components. A lot of features that would have been released with v9 were added to the v8 fra…
Re: Laravel 9
#60For those here wondering why you'd use Laravel over vanilla PHP + MySQL + PDO, a few of my clients had this opinion so I've had experience. The Laravel "fluff" saves you from rewriting tons of code, helps you write test cases, and makes logic easy to follow. One of my clients was very anti "needless vendor packages" (definitely some truth to this sentiment), but we ended up with 14 extra php files reinventing the whe…