Articles about

laravel

Building APIs with Laravel Query Builder

February 10th, 2018 — If you've ever worked on any medium sized API I'm sure you quickly discovered a lot of frequently occurring patterns. Parsing the query string, retrieving necessary models, filtering, sorting, adding pagination and finally encoding the data as JSON. Creating a new endpoint quickly becomes an exhausting chore of making the same decisions repeatedly. To make some of these decisions for us, we built our latest package: laravel-query-builder.

How to ‘hack’ and win the May Mayhem blog contest

May 27th, 2018 — I feel like programmers are often as good at breaking things as they are at fixing things. Part of the thought process of programming anything new is figuring out its flaws, weaknesses and possible exploitations. As a web developer, I often find myself applying the same thought process to everything I see and read about online. Including Laravel's May Mayhem blog contest.

Quickly set up existing Laravel projects

August 23rd, 2018 — Lately, a lot of cool shell aliases and functions have been posted on Twitter. I've decided to join in on the fun and create a shell function for something I do about 5 times per day: setting up an existing Laravel project.

How migrations might be slowing down your Laravel tests

January 4th, 2019 — Over the years I've read a lot of interesting posts about speeding up PHPUnit. The last one being a pretty good summary by Laravel News (link in article). Remarkably, there's one trick that wasn't mentioned in any of these articles. I swear this is not clickbait.

Running Laravel's scheduler without setting up CRON jobs

June 10th, 2019 — Scheduler is a tiny shell script to run Laravel's scheduler every 60 seconds, without having to configure any CRON jobs.

Advanced Laravel migrations using temporary tables

May 19th, 2020 — If you've ever ran a big migration in Laravel before you might know there are a lot of things that can go wrong. Processes go out of memory, migrations crashing half way through leaving some data unmigrated, rollbacks going wrong, etc... Let's see how we can avoid all of the above when creating a somewhat more advanced migration.

Some notes on slow queues and Redis over TLS

January 4th, 2021 — When playing around with a load testing tool and Laravel queues I started noticing a weird pattern: every 22 dispatched jobs, there would be a 5 second delay on all queues before dispatching the next set off jobs. This only seemed to be the case using a DigitalOcean Droplet and their managed Redis servers.