Laravel
These posts are all about Laravel, and any related packages.
Using Generators for Pagination
Inspired by a recent tweet from @freekmurze, his upcoming Mailcoach PHP SDK contains a nice API for paginating through all records: Whilst I definitely like the idea of the...
November 9, 2022 | 3 minute read
ReadUsing MySQL and Postgres functions in SQLite
A common debate in the community is whether you should use SQLite or the same database that you use in production for your tests; assuming you don't use SQLite in production. From the conversations...
October 3, 2022 | 3 minute read
ReadGenerating A Client Secret For Sign In With Apple On Each Request
Recently I was tasked with adding Sign In with Apple to the federated authentication service we use at my day job. Like many other social providers, the open-source Socialite Providers organisation...
August 30, 2021 | 2 minute read
ReadGzip Compression with Laravel Vapor
I was answering some Laravel questions on StackOverflow this week when I stumbled on a question asking how to enable GZIP compression on responses when using Laravel Vapor. We host a number of...
July 30, 2021 | 2 minute read
ReadGuzzle Middleware to Handle External Validation Failures
In this post I want to show how we use Guzzle middleware with Guzzle and Laravel Http clients to catch 422 validation failures from external services and turn them into local validation failures....
July 10, 2021 | 3 minute read
ReadUsing Inertia to Supercharge Server-Rendered Applications
Across two jobs, and a number applications, I've been using Inertia JS to create great SPA experiences with ease. Inertia allows us to leverage server side routing and controllers to quickly create...
January 22, 2021 | 1 minute read
ReadRollback Database Changes When Exceptions Occur
Have you ever run into scenarios where you write some code in your controller that writes a bunch of data to your database? I've often built out API endpoints that accept a big payload of data and...
October 21, 2020 | 2 minute read
ReadA Beginners Guide to Basic Indexing
I want to preface this post with a disclaimer; this literally is a 'beginners guide'. A while back, I was facing some performance issues with an application in production and this post is a...
March 21, 2020 | 10 minute read
ReadCustom Throttle Middleware
I've said it before, and I'll say it again, one of the biggest benefits of using a framework is that so many common use-cases or problems have already been solved - and throttling requests is no...
July 24, 2019 | 4 minute read
ReadCustomising the Email Verification Expiration Time
One of the biggest benefits of using a framework like Laravel is that so many of the common use-cases or problems have already been solved; email verification is no exception. Since Laravel 5.7, it...
July 8, 2019 | 2 minute read
ReadUsing Laravel Horizon outside of Production and Local
Laravel is pretty awesome as far as frameworks go. But what really makes it amazing is the suite of open-source software sitting behind it; one of which is Horizon. Horizon is a dashboard and...
February 11, 2019 | 2 minute read
ReadSetting the correct auth guard for your requests
When I'm writing controllers, I like to minimise the number of dependencies I need to use. This means reusing dependencies I'm already pulling in where I can, and for the most part the...
February 9, 2019 | 3 minute read
Read