---
title: "Kamran Khan (@kamrankhandev) | Hashnode"
description: "Full-Stack Web Developer (React.js + Laravel) | Dashboards, SaaS Apps & Management Systems for Global Clients"
url: "https://hashnode.com/@kamrankhandev"
---

@kamrankhandev

# Kamran Khan

@kamrankhandev · Lahore, Pakistan · Joined October 2026

Full-Stack Web Developer (React.js + Laravel) | Dashboards, SaaS Apps & Management Systems for Global Clients

[Website](https://kamran1272.github.io/portfolio/)

## Comments

[The three questions are the right frame, especially the second one. In my experience the double run is rarely a scheduler bug, it is two workers both thinking they own the job. I now treat every scheduled job as if it will run twice, so I give it a unique key or a lock and make the work safe to repeat. The other change that helped me most was alerting when the expected run is missing, not just when a run fails, because a silent miss is the one nobody notices until a customer does.](https://hashnode.com/posts/cron-job-running-twice-run-ledger/6ae1a0d2af08d0350032cd3e/comment/6ae49886de402a02763fa27a)

Comment · Article · Oct 30 · [Cron Job Running Twice (or Not at All)? Fix the Job, Not the Schedule](https://hashnode.com/posts/cron-job-running-twice-run-ledger/6ae1a0d2af08d0350032cd3e)

[This lines up with how I have chosen in client work. The question I ask first is who maintains it in year two, not which one ships the MVP faster. For a CRUD heavy SaaS with an admin side, Laravel has saved me the most time because auth, queues and scheduled jobs arrive as one tested set instead of five libraries I have to wire together. I would only pick NestJS when the team already writes TypeScript everywhere and real time features are central, not just nice to have.](https://hashnode.com/posts/laravel-vs-node-js-for-a-startup-backend-how-to-choose/6ae49604c59e715aaf56da50/comment/6ae4981641190ba61d30d2fc)

Comment · Article · Oct 30 · 1 · [Laravel vs Node.js for a startup backend: how to choose](https://hashnode.com/posts/laravel-vs-node-js-for-a-startup-backend-how-to-choose/6ae49604c59e715aaf56da50)

[I write it out each time, honestly. I tried a helper once and the failure message got vague about which level broke, so I kept the two asserts visible in each test. It is a bit repetitive, but when it fails I can see at a glance whether the relation is missing or the shape drifted.](https://hashnode.com/posts/your-api-should-never-return-the-model-what-userresource-keeps-out-of-my-responses/6acd575280112b0e2af44e70/comment/6ace233c07fb0fec6365bd83#reply-6ae497519a6c265b64e62f24)

Reply · Article · Oct 30 · [Your API should never return the model: what UserResource keeps out of my responses](https://hashnode.com/posts/your-api-should-never-return-the-model-what-userresource-keeps-out-of-my-responses/6acd575280112b0e2af44e70)

[The end-of-flow rule is the one I would underline. A webhook that returns 200 while skipping the work looks healthy to every other check, and I've only caught that kind of failure by watching for the completed event instead of the arrival. I also like the test-by-breaking step, because an alert I've never seen fire is just a hope. The habit that saved me most was writing the first action into the alert itself, so a quiet night doesn't turn into a confused search for which dashboard matters.](https://hashnode.com/posts/alert-on-what-should-have-happened-catching-signups-payment-webhooks-and-nightly-jobs-that-silently-stop/6ae342cb299447e1c2bf60f3/comment/6ae34697a689abae0d3f61d0)

Comment · Article · Oct 29 · [Alert on what should have happened: catching signups, payment webhooks and nightly jobs that silently stop](https://hashnode.com/posts/alert-on-what-should-have-happened-catching-signups-payment-webhooks-and-nightly-jobs-that-silently-stop/6ae342cb299447e1c2bf60f3)

[The diagnose-first order is the part I would keep. I have wasted more time clearing every cache than I ever saved, and checking whether the config is actually cached usually points straight at the stale file. The case that still catches me is a queue worker that was never restarted, because the web request looks fixed while jobs keep sending mail with the old host. I now treat an .env change as a deploy, not a quick server edit, and I do not consider it done until the worker restart is confirmed.](https://hashnode.com/posts/laravel-env-changes-not-working-config-cache/6ae1a5f558bdea6c6b0f5a8d/comment/6ae34667a689abae0d3f5f8b)

Comment · Article · Oct 29 · [Laravel .env Changes Not Working? Fix the config:cache Trap](https://hashnode.com/posts/laravel-env-changes-not-working-config-cache/6ae1a5f558bdea6c6b0f5a8d)

[I do the same at every level, not just the top one. For a nested user I first assert that data.user is present, then I assert its exact keys, so a missing eager load fails loudly instead of letting the shape check pass over nothing. I apply that same presence-then-shape pair wherever a resource nests another resource, because that is where the quiet pass tends to hide. It adds a few lines per test, but I have caught more missing relations that way than I have caught extra fields.](https://hashnode.com/posts/your-api-should-never-return-the-model-what-userresource-keeps-out-of-my-responses/6acd575280112b0e2af44e70/comment/6ace233c07fb0fec6365bd83#reply-6ae3459f08c6cc096fa5dc5b)

Reply · Article · Oct 29 · [Your API should never return the model: what UserResource keeps out of my responses](https://hashnode.com/posts/your-api-should-never-return-the-model-what-userresource-keeps-out-of-my-responses/6acd575280112b0e2af44e70)

[One thing that bit me on a patch like this: reloading php-fpm is not the same as restarting it. A reload lets old workers finish their current requests, so a long lived upload can keep a vulnerable worker serving for minutes after you've called the box patched. For these I restart outright now, and accept the minute of dropped connections as the price.](https://hashnode.com/posts/php2shell-a-developer-s-guide-to-patching-cve-2026-109618-and-cve-2026-109619/6ada86f0f34b8ed726c54f8c/comment/6adb5dc80e2844ea3a4a49b9)

Comment · Article · Oct 23 · 1 · [PHP2Shell: A Developer’s Guide to Patching CVE-2026-109618 and CVE-2026-109619](https://hashnode.com/posts/php2shell-a-developer-s-guide-to-patching-cve-2026-109618-and-cve-2026-109619/6ada86f0f34b8ed726c54f8c)

[Solid guide, and the canonical point is the one I'd underline twice. One gap I kept hitting on marketplace style sites: listing pages with ?sort=, ?filter= and ?page= in the query string. Each combination is a separate URL to Google, and a canonical that just mirrors the request tells Google every variant deserves indexing. I point filtered listings back to the clean base URL now, keeping only the base page canonical. Quietly the biggest crawl budget leak nobody warns you about.](https://hashnode.com/posts/laravel-technical-seo-guide/6adb0fad8ecc3ec9e2252fa8/comment/6adb5d671e14674ebf378d45)

Comment · Article · Oct 23 · [Laravel Technical SEO: A Practical Guide from URL to Schema](https://hashnode.com/posts/laravel-technical-seo-guide/6adb0fad8ecc3ec9e2252fa8)

[One gotcha I'd add from a rollout like this: when you sync APP\_KEY across the new boxes, every existing encrypted cookie dies at the same moment. We watched a chunk of users get bounced mid session during the cutover. If you're on Laravel 11, APP\_PREVIOUS\_KEYS lets you rotate instead of flipping the switch, so old cookies keep decrypting until they expire naturally. Worth calling out before the big sale, not after.](https://hashnode.com/posts/system-design-drill-day-5-load-balancing-and-horizontal-scaling/6adad0dea48cd2e249e95924/comment/6adb5d1c1e14674ebf378b5e)

Comment · Article · Oct 23 · [System Design Drill Day 5: Load Balancing and Horizontal Scaling](https://hashnode.com/posts/system-design-drill-day-5-load-balancing-and-horizontal-scaling/6adad0dea48cd2e249e95924)

[There is a sibling to this one on servers that upgrade PHP in place rather than rebuilding the image. apt installs the new binary and php -v says 8.5.12, but the running php-fpm pool keeps serving requests from the old one until the service restarts. My rule after any PHP bump is now: restart the FPM pool, then confirm the version through the request path, not just the CLI.](https://hashnode.com/posts/green-deploy-ships-old-php/6ad9d31c010592d53dc4a58b/comment/6ada0d3f7b6785cabc4c1e27)

Comment · Article · Oct 22 · 1 · [A Green Deploy That Ships the Old PHP](https://hashnode.com/posts/green-deploy-ships-old-php/6ad9d31c010592d53dc4a58b)
