logo
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
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
Mocking Classes With Real Time Facades

Mocking Classes With Real Time Facades

In PHP, particularly within frameworks like Laravel, facades provide a static-like interface to classes available in the service container. Here, we delve into the concept of real-time facades, which allow you to treat any class in your application as if it were a facade, enhancing your ability to mock dependencies for testing.
2 minutes to read
Testing with Fake HTTP Requests in Laravel

Testing with Fake HTTP Requests in Laravel

In Laravel, one of the powerful tools for testing is the ability to simulate HTTP responses without actually hitting an external API. This is particularly useful when you need to ensure your application behaves correctly regardless of the API’s response.
2 minutes to read