Tag Archives: laravel

Multi tenancy in Laravel using stancl/tenancy

I spent a day inside stancl/tenancy (the database-per-tenant Laravel package) shipping a real change to a multi-tenant Software-as-a-Service (SaaS) application, and a few things finally clicked for me — none of which were obvious from the documentation alone. 💡 Here … Continue reading

Posted in Laravel, PHP | Tagged , , , , | Comments Off on Multi tenancy in Laravel using stancl/tenancy

Scribe for Laravel: API Docs That Stay Fresh, and a Calm Way to Upgrade Them

Most Laravel teams reach a point where their API documentation is either out of date, written somewhere it shouldn’t be (Confluence, anyone?), or just doesn’t exist. Scribe is the package that quietly fixes this — it reads your routes, controllers, … Continue reading

Posted in Laravel, PHP | Tagged , , | Comments Off on Scribe for Laravel: API Docs That Stay Fresh, and a Calm Way to Upgrade Them

Reading Laravel Config From a Queued Job — and the env() Trap That Bites You in Production

Today’s lesson came from a perfectly innocent-looking change in a Laravel app. We had a magic number — a chunk size — sprinkled across three call sites: 123foreach (array_chunk($userIds, 100) as $chunk) {     SendOnboardingEmailJob::dispatch($chunk); } One reviewer flagged … Continue reading

Posted in Laravel, PHP | Tagged , , | Comments Off on Reading Laravel Config From a Queued Job — and the env() Trap That Bites You in Production

When a Composer package vanishes from GitHub: don’t panic, and don’t delete vendor/

Today our CI/CD pipeline went red on a job that hadn’t been touched in months. The .gitlab-ci.yml was untouched. The branch built fine yesterday. composer install exploded. The relevant chunk of the failure log: 12345678Failed to download acme/some-nova-tool from dist: … Continue reading

Posted in PHP | Tagged , , , , | Comments Off on When a Composer package vanishes from GitHub: don’t panic, and don’t delete vendor/

Spatie activity_log: which method writes to which column? 🐘

If you’re using spatie/laravel-activitylog, you’ve probably written something like activity()->event(…)->log(…) a hundred times without thinking about where each piece lands in the database. The fluent API is friendly, but the column mapping isn’t obvious until you go look — so … Continue reading

Posted in PHP | Tagged , , , | Comments Off on Spatie activity_log: which method writes to which column? 🐘

BOLA in a Laravel Livewire app: when client-side state is the only thing standing between users and admin actions

A penetration test landed an interesting finding on a Livewire-powered admin panel I work on. The summary on the report read: Broken Object-Level Authorization (BOLA). A standard user can change a tenant-wide “who can access these assets” setting by replaying … Continue reading

Posted in Laravel, PHP | Tagged , , , , , , | Comments Off on BOLA in a Laravel Livewire app: when client-side state is the only thing standing between users and admin actions

Azure AD, Google Directory, and SCIM: picking a user-sync story for a multi-tenant Laravel app

Late 2024 I spent a few weeks digging into how a multi-tenant Laravel platform I was working on should let tenant administrators pull users in from external identity providers. The customer asks were predictable — “we use Azure,” “we use … Continue reading

Posted in Laravel | Tagged , , , , | Comments Off on Azure AD, Google Directory, and SCIM: picking a user-sync story for a multi-tenant Laravel app

Free Azure AD SCIM provisioning to a Laravel app on your laptop, via home router + dynamic DNS

In the last post I sketched why SCIM (System for Cross-domain Identity Management) won out over direct Azure Active Directory (Azure AD) and Google Directory integrations for a multi-tenant Laravel app I was working on. This one is the hands-on … Continue reading

Posted in Laravel | Tagged , , , , | Comments Off on Free Azure AD SCIM provisioning to a Laravel app on your laptop, via home router + dynamic DNS

Laravel Jobs, Queues, Batches, and Redis: A Field Guide

Laravel’s queue system is one of those features you can use for years without really understanding what’s happening underneath. You call SomeJob::dispatch(), a worker somewhere picks it up, and life goes on. But the moment a job mysteriously runs twice, … Continue reading

Posted in Laravel | Tagged , , , | Comments Off on Laravel Jobs, Queues, Batches, and Redis: A Field Guide

Laravel Sail: a developer’s cheat sheet 🐳

Laravel ships with Sail — a thin command-line wrapper around docker compose that gives you the whole Laravel toolchain (PHP, MySQL, Redis, Mailpit, Node) in containers, without you needing to install any of them on your host. The only thing … Continue reading

Posted in Web Development | Tagged , , , | Comments Off on Laravel Sail: a developer’s cheat sheet 🐳