Heroku H18 Error on Laravel Large File Upload

I’m experiencing Heroku’s H18 errors uploading large files and passing it to an S3 instance. It happens itermittently. The Heroku docs say the following. Usually, an H18 indicates that a response has multiple stages – forinstance, streaming chunks of a large response – and that one of thosestages has thrown an error.https://devcenter.heroku.com/articles/error-codes#h18-server-request-interrupted The docs further … Read more

Laravel Query Builder Distinct

This is a shoutout to Laravel’s Query Builder method distinct(). I feel sad and embarrassed that I didn’t know about it sooner. There are a lot of instances where I need to get a column’s unique values. And instead of using groupBy() and wasting a lot of resources. You can use distinct(), which will search … Read more

Install Pecl on Mac

To install PECL on your mac, use curl as shown below to download the go-pear.phar file or just download the go-pear.phar file via your browser. You’re now ready to configure PEAR for installation. First you need to change the Installation Base. So type 1, and then press Enter. Enter /usr/local/pear Press Enter. Then, you will … Read more

Laravel Money Format

Need to convert a float or string into a currency format in Laravel? Here are two quick methods. Use PHP’s number_format() in your blade template. You can also add the following to your AppServiceProvider’s boot method. Good luck!

Spatie Laravel Response Cache

How do you cache efficiently in Laravel? Trying to figure out an efficient way to serve data using the least amount of resources is always a challenge to face when scaling. How much of the data to process in the front vs back end. When to cache and how to handle the scope of what … Read more