Tim MacDonalds head shot

Tim MacDonald

Developing engaging and performant web applications with a focus on TDD. Specialising in PHP / Laravel projects. ❤️ building for the web.

Actively contributing to the PHP & Laravel communities with PRs, blog posts, and talks.

  • 0418 492 380
  • Sydney, Australia
New phone, who dis?

Dedicated Query Builders For Eloquent Models

As my current project grew, so did my models. In a hunt for thinner models, I realised it was possible to extract model scopes to a dedicated query builder class. I'll show you how to do this, and a few things to keep in mind if you implement this refactor.

Global application settings

Guest post In applications it is often useful to have a way to store some global settings. This post outlines my approach using a Spatie package to manage the values instead of Eloquent.

Giving collections a voice

Laravel collections have become an essential part of my codebases and I couldn't imagine working without them. I have found giving collections the voice of the problem domain makes for a much nicer API when compared to the generic collection methods.

My feature test suite setup

I do love a good feature test suite. I especially like them to be fast and, most importantly, trustworthy! As my approach has matured, and become stable, I thought I'd share how I go about setting things up.

Laravel Cashier: a helping hand

If you are creating a Laravel app with subscriptions via Stripe - Laravel Cashier might just be the helping hand you were looking for.

Converting paper forms into digital systems

I've recently been getting more and more requests to get paper forms converted into digital versions, so I thought I'd put together this post to explain some of the advantages and possibilities digital forms open up.

Foreign Key Validation Rule

A foreign key validation rule for the Laravel Validator that helps wrap up the 'exists' rule with a bit of syntactic sugar. Probably not fantastic to work with in the traditional fashion, but using the rule builder package...it looks gooooood!

Writing a Zero Downtime Deployment Script

Having never written a shell script before, I thought I'd try and level up my dev skills by writing a simple deployment script for my website and my clients websites. The outcome: FlipIt™