---
title: "Elias Alrgeai (@EliasAlrgeaiDev) | Hashnode"
description: "Laravel & PHP Specialist. Read the latest articles by Elias Alrgeai on Hashnode."
url: "https://hashnode.com/@EliasAlrgeaiDev"
---

@EliasAlrgeaiDev

# Elias Alrgeai

@EliasAlrgeaiDev · Joined July 2026

Laravel & PHP Specialist

### [The Hidden Race Condition Inside firstOrCreate()](https://eliasalrgeaidev.hashnode.dev/the-hidden-race-condition-inside-firstorcreate?utm_source=hashnode&utm_medium=feed)

Laravel's firstOrCreate() looks atomic but isn't. Here's how it silently creates duplicate rows, and the fix that actually works.

3 min read · [eliasalrgeaidev.hashnode.dev](https://eliasalrgeaidev.hashnode.dev/the-hidden-race-condition-inside-firstorcreate?utm_source=hashnode&utm_medium=feed)

[Sep 12](https://hashnode.com/posts/the-hidden-race-condition-inside-firstorcreate/6aa4e5ba20c9b9ad869dca63)

### [The Soft Delete Bug That Lets Duplicate Accounts Slip Through (And the Fix in Laravel)](https://eliasalrgeaidev.hashnode.dev/the-soft-delete-bug-that-lets-duplicate-accounts-slip-through-and-the-fix-in-laravel?utm_source=hashnode&utm_medium=feed)

Laravel's soft deletes can silently break unique constraints. Here's why it happens and how to fix it properly with a composite index.

4 min read · [eliasalrgeaidev.hashnode.dev](https://eliasalrgeaidev.hashnode.dev/the-soft-delete-bug-that-lets-duplicate-accounts-slip-through-and-the-fix-in-laravel?utm_source=hashnode&utm_medium=feed)

[Sep 6](https://hashnode.com/posts/the-soft-delete-bug-that-lets-duplicate-accounts-slip-through-and-the-fix-in-laravel/6a9dd00558a6c4da4fd38049)

### [The Webhook Bug That Gives Cancelled Users Free Access](https://eliasalrgeaidev.hashnode.dev/the-webhook-bug-that-gives-cancelled-users-free-access?utm_source=hashnode&utm_medium=feed)

Webhooks can arrive out of order, letting cancelled users keep paid access. Here's why it happens and how to fix it in Laravel.

3 min read · [eliasalrgeaidev.hashnode.dev](https://eliasalrgeaidev.hashnode.dev/the-webhook-bug-that-gives-cancelled-users-free-access?utm_source=hashnode&utm_medium=feed)

[Sep 1](https://hashnode.com/posts/the-webhook-bug-that-gives-cancelled-users-free-access/6a96a1c09d13e52823d86276)

### [How a Timeout Can Charge Your Customer Twice (And How to Stop It in Laravel)](https://eliasalrgeaidev.hashnode.dev/how-a-timeout-can-charge-your-customer-twice-and-how-to-stop-it-in-laravel?utm_source=hashnode&utm_medium=feed)

Why payment retries can double-charge customers, and how to prevent it in Laravel using idempotency keys and atomic locking with Cache::lock().

4 min read · [eliasalrgeaidev.hashnode.dev](https://eliasalrgeaidev.hashnode.dev/how-a-timeout-can-charge-your-customer-twice-and-how-to-stop-it-in-laravel?utm_source=hashnode&utm_medium=feed)

[Aug 29](https://hashnode.com/posts/how-a-timeout-can-charge-your-customer-twice-and-how-to-stop-it-in-laravel/6a92637b36e7459bf8867677)

### [chunk() vs cursor() vs lazy() — I Benchmarked All 3 So You Don't Have To](https://eliasalrgeaidev.hashnode.dev/chunk-vs-cursor-vs-lazy-i-benchmarked-all-3-so-you-don-t-have-to?utm_source=hashnode&utm_medium=feed)

Laravel's chunk(), cursor(), and lazy() explained and benchmarked for real memory, query count, and speed differences.

10 min read · [eliasalrgeaidev.hashnode.dev](https://eliasalrgeaidev.hashnode.dev/chunk-vs-cursor-vs-lazy-i-benchmarked-all-3-so-you-don-t-have-to?utm_source=hashnode&utm_medium=feed)

[Aug 22](https://hashnode.com/posts/chunk-vs-cursor-vs-lazy-i-benchmarked-all-3-so-you-don-t-have-to/6a897c85d0f92c41b2ec11e0)
