Latest Updates

Documenting code, one commit at a time.

Chat PHP 10 posts
×

Mitigating Session Logout Issues After User Impersonation

Introduction

Have you ever experienced a user being unexpectedly logged out immediately after being impersonated? This issue often stems from inconsistencies in session data following authentication switches. Let's explore how to address this in a PHP-based platform.

The Problem: Stale Session Password Hashes

In many web applications, especially those employing middleware for

Read more

Global Impersonation: Fixing a Routing Glitch in a Laravel Platform

Working on the Reimpact platform, we encountered a routing issue that prevented the 'stop impersonation' feature from working consistently across all panels. This post details the problem and the solution implemented to ensure global functionality.

The Problem

The impersonation.stop route was not always accessible because the RouteServiceProvider responsible for registering it wasn't

Read more

Enhancing Data Visualization in Filament with PostgreSQL Functions

Introduction

This post explores how the Reimpact/platform project enhanced its Filament-based dashboard by leveraging PostgreSQL functions to improve data visualization. The focus was on creating a more insightful and efficient packaging dashboard.

From MySQL to PostgreSQL: A Performance Shift

The initial implementation relied on MySQL stored procedures. To optimize performance and

Read more
PHP Livewire

Maintaining Session Integrity During Impersonation in Livewire

Introduction

When implementing user impersonation functionality, a common pitfall is inadvertently breaking the user's session. This post addresses an issue in a Reimpact platform where session loss occurred during impersonation due to Livewire's single-page application (SPA) navigation.

The Problem: Session Regeneration and SPA Navigation

The Auth::login() function in PHP regenerates

Read more

Refactoring Module Selectors for Enhanced UX in Laravel Filament

When working with Laravel Filament on the Reimpact platform, small UI refinements can have a significant impact on user experience. Recently, we addressed an issue concerning the module selector's icon sizing and positioning, particularly its integration with the platform's logo.

The Problem

The original implementation relied on Tailwind CSS classes for styling the module selector icon.

Read more
PHP Reimpact

Fixing Impersonation Redirects in Reimpact Platform

In the Reimpact platform, a recent issue arose during user impersonation, specifically in the administrative interface. The problem manifested as a 500 error when accessing the ewcommand{\administration}{\texttt{/administration/users}} route. This was traced back to the use of redirect() within the impersonation action.

The core issue was that redirect() returned void and then called

Read more
PHP JUnit

Improving User Experience with Redirects and Automated Testing in Platform

Introduction

This post discusses enhancements made to the platform, focusing on improving the user experience through redirect fixes and ensuring stability with automated testing. The changes streamline user actions and provide confidence in the platform's reliability.

Redirect Chain Optimization

A key improvement involves fixing the redirect chain within the UserResource.

Read more

Taming Blade Component Quirks with Blade UI Kit in Laravel

When working with Laravel projects like Reimpact/platform, you sometimes encounter unexpected behavior when integrating different packages. Recently, we ran into an issue where Filament's DisableBladeIconComponents middleware was preventing Heroicon components from resolving correctly in our module selector.

The Problem

Filament, a popular admin panel package for Laravel, includes a

Read more

Enhancing User Experience with Filament Impersonation

Introduction

The Reimpact platform is undergoing improvements to enhance user experience and administrative capabilities. A key feature recently added is the ability for administrators to impersonate users, streamlining support and testing processes. This post will explore the implementation of Filament impersonation and associated fixes.

The Problem

Previously, the platform relied on a

Read more