logo
Not a Valid Inertia Response

Not a Valid Inertia Response

Have you ever encountered the dreaded “Not a valid Inertia response” error while testing Inertia in your Laravel app? 🤔 Something’s happening in the meantime that is throwing an exception, but we’re not able to see that exception, all what we get is a broad message of “Not a valid Inertia response”
One minute to read
How to Enable Profile Photos in Jetstream

How to Enable Profile Photos in Jetstream

Avatar is a great way to personalize your application! They make user profiles more engaging and ensure everyone has a recognizable avatar when creating or commenting on posts. If you’re using Jetstream and want to enable custom profile photos, here’s a simple guide to get you started.
2 minutes to read
Demystifying Laravel Jetstream

Demystifying Laravel Jetstream

Laravel Jetstream is a polished UI scaffolding package for Laravel applications. It provides developers with a refined starting point for building user interfaces, offering pre-built components and workflows for common features like authentication, profile management, and two-factor authentication.
3 minutes to read
Extracting and Reusing Functions in Pest Tests

Extracting and Reusing Functions in Pest Tests

When working with Pest—the modern and elegant testing framework for PHP—you might encounter scenarios where a custom function is being used across multiple test files. Maybe it’s a function to mock a client request, handle repetitive setup tasks, or simulate specific data conditions. Whatever the case, it’s a great opportunity to extract that function to a reusable location. But where should you place it?
2 minutes to read

Replacing a Faulty Extractor Fan With Chatgpt Help

When my extractor fan stopped working, it made a loud noise and gave off a burning smell. I switched it off, knowing it was time for a replacement. Not being an expert, I removed the cover, snapped a photo of the fan, and consulted ChatGPT. It identified the model and explained the wiring, giving me confidence to proceed.
2 minutes to read
How to Keep Your Test Suite Under Control Without Breaking the Bank

How to Keep Your Test Suite Under Control Without Breaking the Bank

Imagine this: you’re running your test suite every time you make a change, but instead of your tests zipping through like a speedster, they keep calling an evolving 3rd party API that you need to make sure your code is still compatible with.
3 minutes to read
Mocking a Demeter Chain in PHP the Shortcut You Didn't Know You Had

Mocking a Demeter Chain in PHP the Shortcut You Didn’t Know You Had

Ever tried to mock a Demeter chain in PHP? It’s like trying to thread a needle with a rope. Let’s break it down with an example using Laravel.

Example of a Demeter Chain

Imagine you’re working with Laravel, and you have this glorious chain:

$order = Order::find($id);
$status = $order->payment->transaction->status;

Here, we’re grabbing an Order, navigating through its payment, then through its transaction, to get the status.

Now you want to test something, and this chain decides to make your life miserable:

2 minutes to read