tegos
tegos

Ivan Mykhavko

@tegos

Software engineer

â€Ē 5 Posts â€Ē 182 Views

  • No matching results...
  • Searching...

/ 255

Poll Options

🔧 Fixed Laravel Bug (and Got My PR Merged!)

Tried to delete 500 rows with batch... Laravel deleted 500,000+ at once 😅

Turns out, DELETE queries with JOIN + LIMIT/ORDER BY were dropping those clauses - wiping out way more than intended.

I patched it so Laravel now keeps the full query and lets MySQL handle errors properly.
Merged into Laravel 13.x 🎉

✅ No more silent mass deletions
🙌 Open source wins again

dev.to/tegos/battling-laravels-sneaky-deletes-how-i-got-order-by-and-limit-to-play-nice-with-joins-ng9

â€Ē â€Ē

44

â€Ē
â€Ē

Laravel Performance Tip 🚀
Stop hitting the cache twice! Many devs do `Cache::has()` before `Cache::get()` - but that doubles the work for the same key.
Benchmarks say it all:
- ⏱ Execution: 14ms → 6ms
- 🧠 Memory: 47MB → 43MB
- 🔑 Cache calls: 2 → 1
✅ Fix: skip `has()`, just `get()` and check for null:

$value = Cache::get($key);
if ($value !== null) return $value;

Tiny tweak, huge impact under load. Full examples and results in the article!
dev.to/tegos/laravel-cache-tip-avoid-redundant-hasmissing-calls-4hi1

#Laravel #PHP #LaravelTips

â€Ē â€Ē

52

â€Ē
â€Ē

🚀 Optimized my Laravel vendor/ folder and cut it from 200.6 MB ➝ 119.8 MB (40% lighter) ðŸŠķ

Result: faster deploys, smaller Docker images, smoother CI/CD.

Inspired by @jclermont article on trimming the AWS SDK, I ran my own cleanup experiment and shared the steps here:

dev.to/tegos/optimize-vendor-folder-size-1m01



#Laravel #PHP #DevOps

1 â€Ē â€Ē

83

â€Ē
â€Ē

🚀 Excited to share my take on taming business logic in Laravel with Actions & Services! 🛠ïļ Say goodbye to bloated controllers with my practical approach using OrderCreateAction for operations and DeliveryScheduleService for reusable logic. Check out tips, code examples, and a decision matrix to keep your Laravel projects clean and scalable. Inspired by @nunomaduro and others.
dev.to/tegos/laravel-actions-and-services-360d


#Laravel #PHP #LaravelTips

â€Ē â€Ē

76

â€Ē
â€Ē