Exposing Localhost to the Internet: Using ngrok to Test Midtrans Webhooks

Payment gateway integrations almost always need a real, publicly reachable URL. It can’t use localhost:8000 because the gateway itself calls your server to confirm a payment happened. While building payment handling for my project using Midtrans’s sandbox environment, I hit exactly that wall, and ngrok was the fix. The Problem Midtrans (like most payment gateways: Stripe, Xendit, etc) […]
Compressing Images Before Storage in Laravel

When users upload images to a web app, raw uploads can easily be several megabytes each. Multiply that by hundreds of uploads and you’ve got a storage and bandwidth problem. Pages load slower, backups get bigger, and hosting costs climb. The straightforward way to fix it is by compressing images before they hit storage, not after. This […]