Latest Updates

Documenting code, one commit at a time.

PHP Laravel

Tenant Migrations and the Perils of Implicit State

The Reimpact/platform project involves managing multi-tenant applications. One subtle issue arose related to running migrations within these tenants. The original approach, while seemingly straightforward, introduced an unexpected dependency on implicit state, leading to incorrect migration behavior.

The Problem

Initially, tenant migrations were executed using Laravel's

Read more
PHP Laravel

Tenant Schema Migrations in Laravel: Automating Database Management

This post discusses automating tenant database migrations within a Laravel application, focusing on maintaining separate database schemas for each tenant.

The Challenge

In multi-tenant applications, managing database migrations across numerous tenants can be a complex and time-consuming task. Manually executing migrations for each tenant is prone to errors and inefficiencies.

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

Enhancements to Tenant Warehouse Management in Platform

Introduction

The Reimpact platform is undergoing improvements to its multi-tenancy architecture, specifically focusing on tenant warehouse management. This involves refining database queries and updating tenant schemas for better isolation and data integrity.

The Problem

Previously, the GeneratedReportResource was incorrectly querying the company_id on tenant-specific warehouse

Read more

Embracing Filament: Streamlining Testing in Laravel Projects

In modern Laravel projects, choosing the right tools is crucial for efficient development and maintainability. The Reimpact/platform project is undergoing a transition from Nova to Filament, aiming to leverage Filament's capabilities for streamlined administration interfaces. This transition impacts testing strategies, requiring a shift from Nova-specific tests to those aligned with Filament.

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
PHP Laravel

Refactoring for Clarity: Removing Redundant Relationships and Enhancing Widget Functionality in Laravel

In the Reimpact/platform project, we're constantly striving for a cleaner, more maintainable codebase. Recently, we undertook a refactoring effort focused on removing unnecessary relationships, improving widget functionality, and ensuring data consistency across tenants.

Removing Non-Existent Relationships

One area identified for improvement was the MassiveUploadWithErrorsResource.

Read more