Latest Updates

Documenting code, one commit at a time.

MySQL 7 posts
×
PHP MySQL Laravel

Code Formatting and Database Schema Updates

Overview

Recent development activity focused on code style consistency and updates to the database schema.

Code Formatting

Applied automated formatting fixes using php-cs-fixer. This ensures consistent code style across the project, improving readability and maintainability. The tool automatically adjusts spacing, indentation, and other stylistic elements according to predefined rules.

Read more
PHP MySQL JavaScript

Dashboard Stability: Handling Missing Commits Table

Introduction

The application's dashboard was experiencing crashes for tenants that had not yet run the commits migration. This post details the solution implemented to gracefully handle the absence of the commits table in the tenant schema, preventing dashboard failures.

The Problem

When the dashboard attempted to query the commits table to display user activity and calculate API

Read more
PHP MySQL Laravel

Tenant-Based Billing: Fixing Cashier Customer Model

Introduction

After consolidating billing to a tenant-based system (Phase 3), we encountered an issue with the Cashier package. The default customer model was still set to User, causing errors when Stripe webhook events triggered.

The Problem

The stripe_id column, expected by Cashier, was not found because it was looking in the User model instead of the Tenant model.

Read more
PHP MySQL JavaScript

Implementing Dual-Write for User/Tenant Data Separation

Introduction

Our application initially stored user-specific data directly within the Tenant model. As we've grown, the need for a more scalable and maintainable solution became apparent. To address this, we embarked on a project to separate user profiles into a dedicated table within each tenant's schema.

The Challenge

Storing user data directly in the Tenant model created several

Read more

Optimizing Auto-Sync Frequency for Enhanced Responsiveness

Introduction

We recently adjusted the frequency of our automated synchronization process to improve system responsiveness and data consistency. This post details the change and the reasoning behind it.

The Change

The auto-sync schedule was updated from running hourly to every minute. This adjustment aims to provide near real-time updates for critical data.

Schedule::command('posts
Read more