Laravel Pro Tips
#seeders #batches
🔥 #Laravel Tip: Seeding your database one record at a time can slow the DB to a halt. A better option is to use PHP to make a bunch of records and then seed them in chunks. Here’s how you can go from 10,000 queries to 5!
Matt Kingshott
#migrations #seeders
🔥 #Laravel Tip: Sometimes you need to seed a database with millions of records e.g. for stress-testing. To avoid crippling the DB with millions of ‘create’ queries, instead consider ‘making’ a large collection of models, then chunk and insert them.
#seeders #models #factories
Laravel Tip 💡 Eloquent model factories are not only helpful for building your test suite but also for seeding your local database to get your project set up in seconds. Boost your productivity by assigning a bash alias like 'fresh' 🚀
Philo Hermans
#seeders
My 1st Laravel tip in here. Speed up your Seeders
Gariya
No articles were found.