Latest Updates

Documenting code, one commit at a time.

Chat PHP 10 posts
×
PHP Laravel

Enhancing Tenant Isolation in Laravel Queues

Introduction

In multi-tenant applications, ensuring data isolation between tenants is paramount. We encountered an issue in our Reimpact/platform project where queue jobs and dashboard caching mechanisms weren't properly respecting the tenant context, leading to errors and potential data leakage.

The Problem: Missing Tenant Context

Two key areas were affected:

  1. Queue Jobs:
Read more

Evolving Data Structures in Platform Notifications

The platform project is undergoing continuous improvement to enhance its notification system.

The Challenge: Data Structure Evolution

Initially, the notification system stored data in a simple text column. However, as the platform evolved, the need for richer, structured data within notifications became apparent. This required a transition to a more flexible data type.

The Solution:

Read more
PHP Laravel

Ensuring UUID Compatibility in Laravel Notifications

The Problem

In the Reimpact/platform project, we encountered an issue with how user IDs were handled in the notifications system. Specifically, the notifiable_id column in the notifications table was initially defined as a bigint. This caused problems when we started using UUIDs (Universally Unique Identifiers) for user IDs, particularly with PostgreSQL, as bigint columns cannot store

Read more
Laravel PHP

Streamlining Laravel Migrations: Removing Duplicates for Stability

When maintaining a Laravel application like Reimpact/platform, ensuring database migrations are clean and consistent is crucial for smooth deployments and upgrades. Duplicate migrations can lead to frustrating errors, especially in versioned environments.

The Problem: Duplicate Migrations

Imagine deploying a new version of your application only to encounter a "table already exists" error

Read more
PHP Laravel

Enhancing Data Flexibility in Reimpact/platform Notifications

This post discusses a recent enhancement to the Reimpact/platform project, focusing on improving the flexibility and querying capabilities of notification data.

The Challenge

Previously, notification data was stored in a less flexible format, making it difficult to perform complex queries or adapt to evolving data structures. To address this, a decision was made to migrate the notification

Read more
PHP Laravel

Streamlining Filament Database Notifications in Reimpact/platform

Reimpact/platform is undergoing enhancements to improve its notification system. A recent update focuses on integrating Filament database notifications more effectively.

The Enhancement

This update introduces a migration for the notifications table, specifically tailored for Filament database notifications. This ensures that the application is equipped to handle and store notifications

Read more

Enhancing Database Interactions in Reimpact Platform with Notifications and Error Handling

The Reimpact platform is focused on streamlining various business processes. Recent updates enhance the platform's interaction with databases, specifically focusing on user notifications and improved error handling for foreign key violations in both MySQL and PostgreSQL.

Database Notifications

A key improvement involves enabling database notifications within Filament panels.

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

Adding Delete Actions to Filament Resources

The Reimpact/platform project involves building a comprehensive platform, and a recent update focused on enhancing the user experience when managing data through Filament resources. This post details the addition of delete actions to a MassiveUpload resource, streamlining data management directly from the resource table and view pages.

The Enhancement

The primary feature added is the ability

Read more

Optimizing Legacy Database Cleanup in Reimpact Platform

Introduction

When migrating or refactoring a large platform like Reimpact, cleaning up legacy database structures is a common but delicate task. Foreign key constraints can often block the removal of tables, requiring a careful approach to avoid data loss or application downtime.

The Problem: Foreign Key Dependencies

In this case, the deploy process was failing during the removal of

Read more