Latest Updates

Documenting code, one commit at a time.

Multi-Tenancy in Laravel with PostgreSQL Schemas: A Migration Story

Introduction

Row-level filtering is common for multi-tenancy, but what if you need stronger isolation? At Reimpact's platform, we're migrating towards PostgreSQL schemas to achieve true tenant separation, leveraging Laravel, Filament, and the middleware pattern.

This post details our approach to dynamically setting the PostgreSQL search_path for each tenant, ensuring data isolation and

Read more

Integrating fal.ai for Asynchronous Image Generation in Breniapp

The Breniapp project is integrating fal.ai to provide queue-based asynchronous image generation. This enhancement expands the platform's AI capabilities by introducing a new provider for image creation, offering a scalable and efficient solution for content generation.

The Need for Asynchronous Image Generation

Traditional synchronous image generation can be slow and resource-intensive,

Read more

Refining Filament Page Layout for Enhanced User Experience

Introduction

In the Breniapp/brenia project, we're continuously working to improve the user interface and overall user experience. One recent focus has been on optimizing the layout of Filament admin panel pages, particularly in scenarios where a more compact design is desired.

The Challenge: Vertical Space Optimization

Filament, a PHP-based admin panel, offers a flexible and

Read more
PHP Filament

Fixing Late Static Binding Issues in Filament Resources

When developing with Filament, you might encounter issues with PHP's late static binding, especially when working with resources. A recent update to the platform project addressed such a problem, improving the way queries are handled within resource classes.

The issue arose from directly calling Resource::getEloquentQuery(). This approach breaks PHP's late static binding, causing

Read more

Tenant Isolation Strategy: Global Rates in a Multi-Tenant Laravel Application

Introduction

In multi-tenant applications, data isolation is key. One common challenge is determining which data should be tenant-specific and which should be global. In our Laravel platform project, we faced this question with application rates. Initially, we considered rates to be tenant-scoped, but we discovered that, due to regulatory requirements, these rates are actually global and

Read more
PHP Filament

Filament v5: Addressing Class Not Found Errors with Layout Components

Introduction

When upgrading to new versions of frameworks, you sometimes encounter unexpected errors. This post addresses a "class not found" error in Filament v5 related to relocated layout components, and how to resolve it.

The Issue: Layout Components Relocation

In Filament v5, layout components like Section and Grid were moved from Filament\Forms\Components to

Read more

Enhancements to Rate Management in the Platform

Streamlining Rate Management in the Platform

We've been working on the Reimpact platform to improve how rates are managed, focusing on global applicability and enhanced security. Here's a breakdown of the changes.

Global Rate Application

Previously, rates were tied to specific companies. We've transitioned to a model where rates are global, scoped by a priority_product_id.

Read more