Skip to content

Tags

#laravel

Posts tagged #laravel on Dynamo Geeks: 15 posts from the community, most useful first.

15 posts

Posts tagged #laravel

  1. Experience

    Our worst week this year: a queue job that charged one customer three times

    I post the wins here, so I should post this one too. UK ecommerce client, Laravel, a payment gateway the client chose (a smaller provider, not Stripe). Checkout puts a ChargeOrder job on the queue. The job had $tries = 3 with backoff, because "network errors happen". One evening the gateway was slow. The charge request took longer than our HTTP timeout, so the job threw a timeout exception. Laravel did exactly what…

    Ayesha Siddiqui25likes11comments

  2. Question

    Laravel queue jobs do baar run ho rahi hain (jobs running twice), retry_after ka kya chakkar hai?

    Aadab sab ko. School management software mein ek job hai jo ek school ke saare students ki fee receipt PDF banake parents ko email karti hai. Masla ye hai ki kabhi kabhi job do baar chal jaati hai, parents ko do emails jaate hain, aur principal sahab naraz hain. Setup: Laravel 11, PHP 8.3, QUEUE_CONNECTION=redis , worker: php artisan queue:work --tries=3 class SendFeeReceipts implements ShouldQueue { use Queueable;…

    Faizan Qureshi5likes9comments

  3. Question

    Anyone running Laravel Octane on FrankenPHP in production? Memory and singleton horror stories wanted

    We are moving one high traffic client API (about 4M requests a day, mostly reads, Redis cached) from php-fpm to Octane with FrankenPHP. Staging benchmarks look great, p95 from 48ms to 14ms. But I have done this long enough to know staging lies. Setup: PHP 8.3, Laravel 11, Docker, 2 containers behind a load balancer. Questions for people who actually run it in production: Memory growth: do you set --max-requests ,…

    Ayesha Siddiqui5likes7comments

  4. Article

    PHP in 2026 is actually good. Here are my receipts.

    Every few weeks somebody in a thread here tells me PHP is dead. I run an 11 person agency in Karachi. This month PHP paid 11 salaries, our office rent, two laptops and a very expensive coffee machine. If this is death, it is a well paid one. But "it pays" is not an argument about quality, so here are actual receipts. And at the end, what is still bad, because I am not a fan club. Receipt 1: the language grew up PHP…

    Ayesha Siddiqui76likes39comments

  5. Article

    Two cashiers, one last bottle of kecap: fixing overselling in a Laravel POS with row locks

    One of my clients is a small minimarket chain, 4 stores, 6 cashiers per store at peak. Last Lebaran, the day before the holiday, the stock report showed -14 bottles of kecap manis . Negative stock. The owner asked me, very politely, how we sold 14 bottles that do not exist. Good question, mas. The bug $product = Product::find($id); if ($product->stock < $qty) { throw new OutOfStock($product); }…

    Bayu Setiawan14likes9comments

  6. Article

    Enums, readonly and match: the PHP 8 features that made my juniors' code reviewable

    Code review in my agency used to be 40% "what values can this string have?" and "who changed this amount after the controller?". PHP 8 killed most of those comments. Here are the features that did it, with the code we actually write now. 1. Backed enums (8.1) enum OrderStatus: string { case Pending = 'pending'; case Paid = 'paid'; case Shipped = 'shipped'; case Cancelled = 'cancelled'; public function label():…

    Ayesha Siddiqui23likes14comments

  7. Experience

    Right, they're down. Where was I? Coding in the 9pm to midnight window as a dad of two

    Every evening at about half eight I do the same thing. Bath, teeth, two stories (one of which is always the same dinosaur book, I could recite it in my sleep and sometimes do), one glass of water, one second glass of water, "Dad there's a noise", and then finally, around nine, quiet. I come downstairs, open the laptop and say out loud to nobody, "right, they're down, where was I." The answer, for about the first…

    Imran Hussain10likes9comments

  8. Article

    Stripe webhooks in Laravel: verify, queue, return 200, and stop double-fulfilling orders

    Kids are asleep, so here's the webhook setup we've been running on an ecommerce client for two years. It came out of a Black Friday where we shipped some lucky customers two of everything. Not Cashier, plain stripe-php, because the client has a custom checkout. Why webhooks go wrong Stripe retries a webhook if you don't answer with a 2xx quickly, and it keeps retrying for up to three days. If your handler does the…

    Imran Hussain16likes7comments

  9. Experience

    The Dubai client who wanted us to rewrite in Node 'because PHP is old'

    Story time, because this happened again this month and I want to have a link to send next time. Logistics client in Dubai. Laravel app we built in 2021, about 40k shipments a month, drivers, tracking page, invoices. They hired a new CTO from a big company. First meeting: "PHP is old, we need to rewrite in Node, NestJS, microservices. How long?" I did not argue. I said: give me two days to profile, and I will give…

    Ayesha Siddiqui20likes11comments

  10. Question

    Multi-tenant Laravel for 40 koperasi: one database with tenant_id, or one database per tenant?

    Hello all. I maintain a savings and loan system (koperasi simpan pinjam) used by 40 cooperatives. Same features for all, each has 2,000 to 20,000 members. Laravel 10, PHP 8.2, MySQL 8, one VPS. Now it is single database, every table has koperasi_id , and I use a global scope: class KoperasiScope implements Scope { public function apply(Builder $builder, Model $model): void { $builder->where(…

    Bayu Setiawan4likes8comments

  11. Article

    Your Laravel app is not slow. Your loop is.

    A Dubai client called last month. "The admin is slow, maybe we need a bigger server?" The orders page took 6.1 seconds. I opened Debugbar and the query counter said 1,214 . For one page. Of 50 orders. The server was fine. The loop was not. The code (simplified, but not by much) // OrderController@index $orders = Order::latest()->paginate(50); {{-- orders/index.blade.php --}} @foreach ($orders as $order) <tr> <td>{{…

    Ayesha Siddiqui16likes11comments

  12. Article

    Deploy Laravel di shared hosting cPanel tanpa drama (dan tanpa upload folder vendor lewat FTP)

    Sugeng siang gan. Banyak klien saya koperasi dan toko kecil, budget hosting mereka 30-50 ribu sebulan, jadi VPS belum masuk akal. Ini langkah yang saya pakai sejak 2019 untuk deploy Laravel di shared hosting cPanel. Sudah dipakai di 20an klien, aman. 1. Struktur folder Jangan taruh semua isi project di public_html . Folder .env , vendor , storage jadi bisa diakses dari browser. Taruh project di luar:…

    Bayu Setiawan10likes8comments

  13. Article

    Laravel queues that don't fall over: Horizon + Supervisor on a cheap VPS

    Every few weeks a junior in my team (or a freelancer in my DMs) shows me a production server where the queue worker is running inside screen . It works until the server reboots, or the worker eats a bad job and dies at 3am, and then the client calls me asking why no invoices went out since Tuesday. Uff. So here is the setup we actually use. Nothing fancy. A 2 vCPU / 4 GB VPS for about 12 dollars a month runs Redis,…

    Ayesha Siddiqui44likes11comments

Get the best of Dynamo Geeks weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.