Latest Updates

Documenting code, one commit at a time.

Handling Livewire Requests with Laravel Middleware

The Problem

In a Laravel application, particularly when using Livewire, maintaining consistent authentication behavior across different types of requests can be tricky. A common issue arises when Livewire requests, which often send Content-Type: application/json, are not correctly handled by authentication middleware, leading to unexpected 401 errors instead of redirects to the login page.

Read more

Troubleshooting 401 Errors After Login in Laravel Applications

Introduction

Experiencing a 401 Unauthorized error immediately after a successful login can be a frustrating issue in Laravel applications. This often stems from incorrect redirection targets or misconfigured middleware. Let's explore how to diagnose and resolve such problems, specifically within the context of projects using middleware for access control.

Understanding the Problem

Read more

Tenant Context Troubles: Debugging Queue Deserialization in a Multi-Tenant Laravel App

In the Reimpact/platform project, we encountered a tricky issue with queue deserialization in our multi-tenant environment. This post details the problem, our investigation, and the solution we implemented.

The Problem

Our application uses a queue to generate reports. A GenerateReportJob is dispatched, serializing the GeneratedReport model.

Read more

Tenant Schema Resetting Too Early: A Laravel Livewire Gotcha

The Reimpact/platform project focuses on providing a multi-tenant application structure. Recently, we encountered an issue with tenant database schemas being reset prematurely during Livewire updates. This post dives into the problem and the solution implemented.

The Problem

In a multi-tenant application, each tenant typically has its own database schema. We use middleware to set the correct

Read more

Ensuring Tenant Context for Filament Uploads in Laravel

Introduction

When building multi-tenant applications with Laravel and Filament, it's crucial to ensure that operations are performed within the correct tenant context. This post addresses a common issue encountered when using Filament's massive upload feature where the tenant context was not active during Livewire form submissions, leading to data integrity violations.

The Problem: Tenant

Read more

Streamlining Filament Forms with Namespace Updates and Tenant Context Resolution

Keeping dependencies up-to-date can be a headache, especially when upgrading major versions of frameworks. Let's look at how recent changes in the Reimpact platform addressed a namespace change in Filament v5 and improved tenant context resolution.

The Challenge: Filament v5 Namespace Update

Filament is a popular Rapid Application Development (RAD) framework for Laravel.

Read more

Enhancing Tenant Management and File Handling in Laravel Applications

Introduction

When building multi-tenant applications with Laravel, ensuring proper tenant context and efficient file handling are critical. Recent updates to the Reimpact platform focus on improving these aspects, streamlining tenant schema management and simplifying large file uploads.

Tenant Schema Isolation Improvements

Proper tenant schema isolation is essential for maintaining data

Read more

Maintaining User Locale Across AJAX Requests in Breniapp

Introduction

In single-page applications built with frameworks like Livewire, maintaining the correct user locale across all interactions can be tricky. The Breniapp project encountered an issue where the user interface language would revert to the browser's default (often English) during AJAX requests, even if the user had initially selected a different language.

The Problem: Locale

Read more