Tim MacDonald
banner
tim.macdonald.au
Tim MacDonald
@tim.macdonald.au
Doggos, hypermedia, and core team at @laravel.com

https://tim.macdonald.au
✍️ New post: Sticky database connections across requests with Laravel 🍯

Support Laravel's `sticky` option for read write database replicas across different requests.

tim.macdonald.au/sticky-datab...
Sticky database connections across requests with Laravel
Support Laravel's `sticky` option for read write database replicas across different requests
tim.macdonald.au
September 3, 2025 at 5:25 AM
Reposted by Tim MacDonald
We've had a fair number of requests for Nightwatch setup instructions on Vapor, so we put together a guide to help get you started.

Nightwatch 🤝 Vapor

nightwatch.laravel.com/docs/guides/...
Laravel Vapor - Laravel Nightwatch
Get started with Nightwatch on Vapor
nightwatch.laravel.com
June 19, 2025 at 2:02 AM
Reposted by Tim MacDonald
We just shipped Nightwatch: application monitoring & logging obsessively optimized for Laravel.

✨ Start with a single command
📊 Monitor every event
⏱️ Review precise timelines & logs
⚠️ Hear less noise with smart alerts

And much more, including a free plan for anywhere you deploy Laravel apps.
June 17, 2025 at 12:02 AM
Reposted by Tim MacDonald
laravel new bluesky
April 21, 2025 at 11:29 PM
Wanna shorten imports when using Laravel Wayfinder?

Add a custom Vite alias pointing to whatever directory makes sense for your project.
April 20, 2025 at 2:41 AM
Opened a framework PR to introduce a memoized cache driver.

`Cache::memo()->get($key);`

github.com/laravel/fram...
[12.x] Introduce memoized cache driver by timacdonald · Pull Request #55304 · laravel/framework
We put things in the cache because the cache is fast; that doesn't mean hitting the cache is free. This PR introduces a memoized cache driver. This new driver is a decorator around other cache ...
github.com
April 9, 2025 at 7:29 AM
Reposted by Tim MacDonald
I'm fascinated with the data Nightwatch is collecting

This new site for a client is eye-opening to not only the quantity of 4xx requests (targeting pre-me routes including `wp-admin`), but also the impact these have on the server's capability 🤯

And this data now drives change for our server mgmt
April 8, 2025 at 2:25 AM
🧼
April 8, 2025 at 3:01 AM
Reposted by Tim MacDonald
How does the laravel team keep cooking this stuff up!? Wayfinder looks amazing!
April 4, 2025 at 2:58 PM
✍️ Fresh post: Fake expectations

A testing fake with named assertions or Pest PHP's expectation API: ¿Por Qué No Los Dos?

tim.macdonald.au/fake-expecta...
Fake expectations
A testing fake with named assertions or Pest PHP's expectation API: ¿Por Qué No Los Dos?
tim.macdonald.au
April 5, 2025 at 2:51 AM
Laravel Wayfinder integrates perfectly with Inertia, however it also pairs lovely with Axios and the fetch API.

✨✋⛵️
April 4, 2025 at 9:00 PM
ICYMI
✍️ Mark all files as un-viewed in a GitHub pull request

GitHub has a feature to mark individual files as viewed while reviewing a pull request.

I wanted the ability to mark _all_ files as un-viewed.

tim.macdonald.au/mark-all-fil...
Mark all files as un-viewed in a GitHub pull request
Use the "viewed" feature on GitHub PRs? Me too, and I wanted to ability to mark *all* files as un-viewed.
tim.macdonald.au
April 4, 2025 at 12:07 PM
Reposted by Tim MacDonald
From the galaxy brain of @tim.macdonald.au, with just a dash of Tannenbaum, presenting Laravel Wayfinder.

Automatically generate TS functions for your controllers/named routes so you can call your endpoints directly in your client code.

Available now in public beta.

github.com/laravel/wayf...
GitHub - laravel/wayfinder
Contribute to laravel/wayfinder development by creating an account on GitHub.
github.com
April 2, 2025 at 7:29 PM
Reposted by Tim MacDonald
Little @tim.macdonald.au x @joe.codes beta package drops tomorrow, I... love this one. And am very excited.
April 1, 2025 at 7:22 PM
✍️ Mark all files as un-viewed in a GitHub pull request

GitHub has a feature to mark individual files as viewed while reviewing a pull request.

I wanted the ability to mark _all_ files as un-viewed.

tim.macdonald.au/mark-all-fil...
Mark all files as un-viewed in a GitHub pull request
Use the "viewed" feature on GitHub PRs? Me too, and I wanted to ability to mark *all* files as un-viewed.
tim.macdonald.au
March 31, 2025 at 10:12 PM
Merged 🫡
March 28, 2025 at 10:48 PM
Opened a PR to add the `pipe` method to the query builders.

Adds the ability to create invokable _action_ scopes to complement tappable scopes.

github.com/laravel/fram...
[12.x] Add `pipe` method query builders by timacdonald · Pull Request #55171 · laravel/framework
This PR introduces a pipe method to the base query builder and eloquent query builder. The functionality of this method is the same as the collection pipe method. $records = DB::query() ->fr...
github.com
March 26, 2025 at 1:02 PM
“Because of their excessive reverence for omens, they let the words of others guide them rather than their own intuition, and they creep down alleyways picking up advice from other people’s remarks, thinking with their ears, so to speak, not with their brains.”
January 21, 2025 at 9:12 PM
Reposted by Tim MacDonald
Respect to @tim.macdonald.au and the Laravel community for understanding the decision to release breaking changes in a patch and gracefully handling the disruption to their users. And shoutout to other maintainers in the ecosystem for helping their users upgrade and stay safe.
January 21, 2025 at 8:55 AM
Reposted by Tim MacDonald
I just published my 27th post. A bit personal and vulnerable, and I really wonder how I'm going to feel about it in the morning, but for now - here it is:

www.zuzana-k.com/articles/som...
Some dreams were only ever meant to be dreams
Zuzana K - Web developer, Founder, Public Speaker, Writer
www.zuzana-k.com
December 11, 2024 at 12:02 AM
Reposted by Tim MacDonald
i just learned that you can set a custom font in Slack by typing “/slackfont ”! i’m not a roboto mono fan myself but do love monospaced fonts. reference: www.theverge.com/21432669/sla...
How to change your font in Slack
You could change it to any font you have locally.
www.theverge.com
December 9, 2024 at 11:17 PM
Wanna make Slack better?

Settings:

1. Appearance > Font = Robot Mono
2. Messages > Theme =Compact
3. Messages > Names = Just display names
4. Messages > Additional options: uncheck “Display information about who is currently typing a message”

Give it a week. I don’t even hate Slack anymore.
I changed my font in Slack to a monospace font thanks to @tim.macdonald.au and phew what an upgrade
December 9, 2024 at 10:43 PM
🍭 Refactoring a callback to a first-class callable? Heck yea.

But also…

You might be subtly changing behaviour by implicitly passing additional arguments, especially with collection pipelines.
December 9, 2024 at 10:36 PM
Learnt something new about Laravel today.

I always thought Laravel’s `$fallback` value kicked in when a retrieved value was either missing OR `null`.

I always thought these two approaches were equivalent.

Always learning.
November 18, 2024 at 2:18 AM
A pattern I’ve been enjoying recently is extracting binding callbacks from Laravel service providers into smaller dedicated factory classes and then replacing the anonymous closure with the factories invoke method.

Just want the container to accept `callable` rather requiring `Closure`.
November 13, 2024 at 11:27 PM