Latest Updates

Documenting code, one commit at a time.

PHP AI Breniapp

Tenant-Specific AI Models: Removing the Guesswork

The Breniapp platform now offers per-tenant AI model assignments, providing more control and predictability in generation flows.

Previously, the system relied on a fallback mechanism to select an AI model. This could lead to inconsistent results and required users to manually pick a model for each generation. The new approach eliminates this ambiguity by allowing administrators to explicitly

Read more
PHP AI

AI Rewrite Service: More Than Just String Manipulation

When connecting quick actions to an AI service, developers must move beyond simple string manipulation and leverage the power of AI for more sophisticated content transformations.

From Naive Manipulation to AI-Powered Rewrites

Initially, basic functionalities like shortening content or changing a call to action (CTA) might seem achievable through simple string truncation or concatenation.

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

Debugging Authentication Issues in Laravel Filament

Introduction

When developing with Laravel and Filament, encountering authentication issues can be a common challenge. Diagnosing these issues, especially vague 401 errors, requires a strategic approach to uncover the root cause. This post outlines a method for adding detailed logging to your authentication process to better understand and resolve such errors.

The Problem: Elusive 401

Read more
PHP AI

Streamlining Tenant AI Usage Reporting in Breniapp

Introduction

Reporting on tenant AI usage is crucial for understanding resource consumption and billing in Breniapp, a multi-tenant application. However, overly complex reports can obscure key metrics. We recently simplified the tenant AI usage table to focus on the most essential data points.

The Problem

The original tenant AI usage table contained redundant information and unnecessary

Read more