cnngraphics's avatar

Justified? Advocate for better Laravel Code Base

Dear community, I stumbled upon this article from an auther about what could be better for Laravel Framework. I wonder what is your take of these items?

https://www.freecodecamp.org/news/moving-away-from-magic-or-why-i-dont-want-to-use-laravel-anymore-2ce098c979bd/

0 likes
2 replies
repat's avatar

This pops up every now and again, the points are at least 4 years old

As this user points out, the 2 major points are mostly:

  1. Eloquent/Active Record

Answer: Don't use it then. You can just use the Query Builder.

  1. Facades

Answer: Don't use it then. They are also disabled in Lumen (though can be enabled with $app->withFacades()).

Apart from that, Larastan is a static analyzer that understands Laravel magic and you can use barryvdh/laravel-ide-helper for your IDE as he pointed out in his article.

jlrdw's avatar

I would say no not justified. Taylor Made laravel very flexible and easy to use.

For some large queries requiring join and group by, I use getPdo(), which is the PDO instance. Of course I bind necessary parameters.

But the point is there are many ways to use laravel without just using active record.

But I do like facades also, I like the static looking calls and that's just my preference.

Please or to participate in this conversation.