Latest Updates

Documenting code, one commit at a time.

PHP Laravel

Fixing Tenant Scoping with TenantAwareBuilder in Laravel

The Problem

In multi-tenant Laravel applications built with Filament, scoping data to the current tenant is crucial. We encountered an issue where Filament's multi-tenancy implementation, using whereIn() for tenant scoping, failed when applied to tenant schema tables lacking a company_id column. This resulted in "column 'company_id' does not exist" errors across Filament resources.

Read more

Handling Livewire Requests with Laravel Middleware

The Problem

In a Laravel application, particularly when using Livewire, maintaining consistent authentication behavior across different types of requests can be tricky. A common issue arises when Livewire requests, which often send Content-Type: application/json, are not correctly handled by authentication middleware, leading to unexpected 401 errors instead of redirects to the login page.

Read more
PHP Laravel

Streamlining Module Access in Reimpact Platform

The Reimpact platform aims to provide a robust foundation with customizable features for various user roles. A recent enhancement focuses on simplifying and automating module access assignments.

The Challenge: Manual Permission Management

Previously, managing module access for different user types involved manual configuration, which could be time-consuming and prone to errors.

Read more

Enhanced Error Logging for Laravel Authentication

Introduction

In the Reimpact/platform project, diagnosing login issues can be challenging, especially when users encounter authentication errors. To streamline this process, we've implemented more detailed logging for HTTP exceptions related to authentication failures (401 Unauthorized, 403 Forbidden).

The Problem

Previously, when a user failed to authenticate, the logs provided limited

Read more

Troubleshooting 401 Errors After Login in Laravel Applications

Introduction

Experiencing a 401 Unauthorized error immediately after a successful login can be a frustrating issue in Laravel applications. This often stems from incorrect redirection targets or misconfigured middleware. Let's explore how to diagnose and resolve such problems, specifically within the context of projects using middleware for access control.

Understanding the Problem

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

Streamlining Media Handling in Breniapp

The Breniapp project focuses on streamlining internal business processes. Recently, we tackled an issue with how media assets were being handled, specifically in the content library.

The Problem

The asset() helper function was generating incorrect URLs for files stored in the public disk, leading to broken links and display issues.

Read more
PHP UX Breniapp

Enhancing Onboarding Flow with Streamlined CTA Selection in Breniapp

This post delves into recent improvements made to the onboarding process in Breniapp, focusing on a more intuitive and user-friendly experience. These changes align the onboarding flow with the Lovable specification, specifically targeting CTA selection and copy style options.

The Challenge

Previously, the process of selecting primary and secondary Call-to-Action (CTA) options during

Read more
PHP Laravel CSS

Improving UI Compactness in Reimpact Platform

The Reimpact platform aims to provide a streamlined user experience. One aspect of this is ensuring that UI elements, such as widgets, are compact and efficient in their use of screen space.

The Problem: Widget Padding

QuickLinksWidget cards, used for displaying quick access links, were taking up more space than necessary due to excessive padding.

Read more