Latest Updates

Documenting code, one commit at a time.

Taming Filament: Resolving API Incompatibilities in a Laravel Package

When integrating third-party packages into a Laravel application, API compatibility issues can lead to frustrating errors and broken functionality. Recently, while working on the Reimpact platform, we encountered such challenges with the Filament admin panel when integrating an Ecodesign module.

The Problem: Fatal Errors and Broken Builds

The Ecodesign module, developed against a different

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

Refactoring PostgreSQL Dashboard Functions in Reimpact/platform

The Reimpact/platform project is focused on [description]. Recent work has concentrated on improving the reliability and accuracy of PostgreSQL dashboard functions. A key area of focus was addressing data type mismatches and sequence issues that could lead to errors and inconsistencies in the displayed data.

The Problem

One specific issue involved the product_ranking function, where a

Read more

Improving File Handling in Landing: A Move from Streaming to Storage

The landing project focuses on creating engaging landing page experiences. Recently, we tackled an issue with generating and serving CV files, specifically DOCX files. The initial approach of streaming the generated file directly to the user via php://output was causing file corruption issues. This post details the problem and the solution we implemented.

The Problem: Corrupted DOCX Files

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

Robust Data Handling in PostgreSQL Dashboard Functions

Introduction

The Reimpact platform leverages PostgreSQL for its data storage needs. Ensuring data integrity and accurate comparisons within dashboard functions is crucial for reliable reporting and analysis. Recent work focuses on addressing data type inconsistencies that can lead to unexpected errors and inaccurate results.

The Problem

In the PostgreSQL database, the `products.

Read more
PHP Laravel CSS

Fixing Filament Panel Rendering with Inline Styles

The Reimpact platform utilizes Filament for its admin panels. A recent update addressed an issue where the impersonation banner wasn't rendering correctly across all panels.

The Problem

The bg-warning-500 class in Filament relies on CSS custom properties. These properties weren't consistently available during the BODY_START render hook, leading to inconsistent banner styling.

Read more