2 ms·
Why do you prefer it over say, Flask or Django?
by Naac 6y ago
Why do you prefer it over say, Flask or Django?
- deleted 6y ago[deleted]
- gremlinsinc 6y agoLaravel performs way better than Django, I also prefer the migrations/model styles that resemble Rails a bit more. Django might be better w/ 3.3 or whenever they fully integrate async into the view/db layer, but w/ laravel I can plug in swoole and go from 110 reqs/sec to 4600+ on my dev pc - w/ 12 threads and 200 connections hitting a post api logged in, updating the database and the caching layer, and queuing notifications. Just ran some big benchmarks on laravel w/ php-fpm vs swoole last night...as an aside. I also don't like some of the ways django handles auth. If I were to use python, I'd definitely go w/ FastAPI, it seems much more joyful a framework. I'd also love to do something like go for sessions/auth/jwt and hasura, postgraphile, or postgrest or some sort of api from postgres, and then most of the logic would simply be postgres functions/triggers/etc...there's also some nice 'built-ins/ecosystems stuff that even rails lacks'. Auth is built in, vs devise (being almost a requirement). Message queues, notifications, .env, events/listeners, are also all built-ins. Eloquent is nice, though repositories using straight sql or the DB class are probably more performant, but you lose a lot of the magic that makes laravel nice, so there's trade offs. Also all the many drivers for caching/queues/etc and telescope is a very beautiful way to debug and so is ignite for error pages. Horizon is nice to manage queues/etc. I keep trying to move to another framework just for the sake of 'something new' and boredom but after 8 years on laravel, I still keep coming back. Wordpress is a totally different story, I charge 35% markup on my normal rates just to touch wordpress because it sucks so bad and hurts my brain to work w/ it. Also, I don't really need to worry about how to setup vue or react, laravel-mix pretty much handles all the webpack stuff w/ a few exceptions if I'm using Tailwinds or creating aliases for paths, etc...