Latest Updates

Documenting code, one commit at a time.

Solving Livewire Rendering Glitches with wire:key and PHP Styling in Breniapp

This post discusses how we addressed a rendering issue in the Breniapp project related to dynamically updating canvas aspect ratios. The problem stemmed from using Alpine.js to manage the aspect ratio of a canvas element within a Blade template that conditionally rendered based on Livewire state.

The Problem

Initially, Alpine.js was used to dynamically update the aspect ratio of a canvas

Read more

Code Style Consistency in Breniapp/brenia with php-cs-fixer

Introduction

Maintaining a consistent code style is crucial for any project, especially when multiple developers are contributing. This post delves into how the Breniapp/brenia project enforces code style using php-cs-fixer, focusing on Livewire dispatch calls.

The Importance of Code Style

Consistent code style improves readability, reduces cognitive load, and minimizes merge

Read more
PHP Livewire

Serving Files Directly: Migrating from Livewire AJAX to HTTP Routes

This post details a recent optimization in the landing project, focusing on how we transitioned file downloads from a Livewire AJAX implementation to a more robust HTTP route. This change addresses issues with file corruption and improves overall reliability.

The Problem: Corrupted File Downloads

Initially, we used a Livewire method, downloadCv(), to serve dynamically generated DOCX files.

Read more

Mitigating XSS Vulnerabilities in Livewire/Alpine.js with @js()

The Problem

In the landing project, we encountered a subtle but significant security issue related to how data was being passed from PHP to JavaScript within our Blade templates. Specifically, when using Livewire and Alpine.js, values containing special characters (like apostrophes in names such as "O'Brien") could break the JavaScript context, leading to unexpected behavior or, worse,

Read more

Improving Feedback Form Accuracy in Landing Pages

Introduction

In web development, capturing accurate context is crucial for debugging and improving user experience. This post addresses an issue encountered in the devlog-ist/landing project where the feedback form was capturing an incorrect URL due to server-side rendering limitations with Livewire.

The Problem: Server-Side URL Capture

When using Livewire, attempting to capture the

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

Unifying Branding Across Filament Panels in Reimpact Platform

Introduction

Maintaining a consistent brand identity across multiple admin panels can be a challenge. In the Reimpact platform, we faced this issue with our eight Filament panels, each serving different modules. The goal was to ensure a unified look and feel while streamlining maintenance and updates.

The Problem

Previously, each Filament panel had its own branding configuration, leading

Read more

Prompting for Feedback: Balancing User Experience and Engagement

Collecting user feedback is crucial for iterative improvement in any application. However, the timing and method of prompting users for feedback can significantly impact their experience. In the Breniapp application, a new approach balances proactive engagement with user comfort.

The Feature: Just-in-Time Feedback Prompts

A Livewire component has been introduced to present users with a

Read more