Latest Updates

Documenting code, one commit at a time.

Enhancing Filament Tables with Manual Filtering, Searching, Sorting, and Pagination

Introduction

When working with Filament, especially when displaying data from sources other than Eloquent models, you might encounter situations where the built-in features for filtering, searching, sorting, and pagination don't work out of the box. This post describes how to manually implement these features for array-based report tables within Filament admin panels.

The Challenge: Array

Read more
PHP Laravel

Refactoring Data Presentation in Reimpact/platform

The Reimpact/platform project is undergoing improvements to its data presentation layer, focusing on enhanced readability and structural clarity. This involves reformatting data reports to be more user-friendly and logically organized.

Enhanced Data Reporting

The recent work centers around improving the way data reports are rendered. Instead of repeating headers for each row in a data

Read more

Enhancing Report Generation in Reimpact/platform: Storing and Displaying Report Data

This post discusses recent enhancements to the report generation process within the Reimpact/platform project, focusing on storing and displaying the generated report data.

The Feature

The primary goal of these changes is to persist generated report data and provide flexible views for different report types. This involves adding a report_data column to the packaging_generated_reports

Read more

Recovering PostgreSQL Report Functions in Laravel

Introduction

When performing database migrations, especially in multi-tenant environments, it's crucial to ensure all aspects of the schema are correctly applied to each tenant. This post explores a scenario in a Laravel application where PostgreSQL functions were unintentionally dropped during a tenant migration and how they were recovered.

The Problem: Silently Missing Functions

Read more

Multi-Tenancy Done Right: Tenant-Specific Database Tables

When building a multi-tenant application with Laravel and PostgreSQL, handling data isolation is crucial. One effective approach is to use separate database schemas for each tenant. This provides a high level of isolation, ensuring that data from different tenants remains completely separate. Let's explore how this works in practice within the Reimpact platform.

The Problem: Shared Tables

Read more

Improving Error Handling in the Reimpact/platform Project

This post details improvements to error handling within the Reimpact/platform project, focusing on delete operations and providing more specific and informative error messages.

The Problem

Previously, the platform had a generic catch-all for delete errors. This made it difficult to distinguish between expected errors, such as foreign key violations, and unexpected errors, hindering debugging

Read more

Ensuring Data Integrity: Restoring Global Rates in a Laravel Application

Introduction

Maintaining data accuracy across all tenants in a multi-tenant application can be challenging. This post explores how to correct an issue where global rates were inadvertently made tenant-specific in a Laravel application, impacting data integrity.

The Problem: Tenant-Scoped Rates

Originally, the rates table was intended to store global rates applicable to all tenants.

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

Handling Large Uploads and Improving Error Notifications in a Filament Application

When working with the Reimpact/platform project, we encountered an issue with large upload deletions that resulted in failures and an unhelpful JSON response. This post describes how we resolved the deletion failure and improved the user experience by displaying a Filament notification instead of a raw JSON page.

The Problem

Deleting a large number of generated reports and calculated data

Read more