ERAG
ERAG (Engineer • Research • Advance • Grow) builds and maintains SaaS Laravel and publishes open-source packages for Laravel, Inertia, Vue and React at erag.in. You can read more about SaaS Laravel and ERAG.
Articles signed by ERAG are written by the team that builds the kits. They cover multi-tenancy with a database per customer, roles and permissions, sign-in security, Laravel architecture and code quality, and the day-to-day work of launching and running a SaaS product.
Elsewhere:erag.inGitHubLinkedInX
Articles by ERAG
40 articles on the SaaS Laravel blog, newest first.
Multi-tenancy·
Deleting Tenants Safely in LaravelHow to delete a tenant in Laravel safely: what stancl/tenancy removes, what it leaves behind, the soft delete trap, and a deletion flow you can retry.
SaaS & operations·
Deploying a Laravel SaaS to ProductionDeploy a Laravel SaaS step by step: server needs, wildcard DNS and TLS, a deploy script with tenant migrations, queue workers with Supervisor and the scheduler.
SaaS & operations·
SaaS Pricing: How to Price Your SaaS ProductA practical SaaS pricing guide for developers: value metrics, pricing models, tiers, trials vs freemium, annual plans, and how to turn plans into code.
Inertia & frontends·
Inertia Forms with the Form ComponentA practical guide to the Inertia Form component: field names, errors, slot props, reset and dirty state, file uploads, events and when to use useForm instead.
AI & developer tooling·
Laravel Boost: AI Coding Agents for LaravelLaravel Boost gives AI coding agents real context on your app: what boost:install writes, guidelines, skills, the MCP tools and how to keep it all up to date.
Architecture & code quality·
Laravel Data Objects with spatie/laravel-dataA practical spatie laravel data guide: build typed Data objects, validate requests, map snake_case fields, handle relations and send clean props to Inertia.
Authentication & security·
Email Verification in LaravelLaravel email verification explained: MustVerifyEmail, signed links, the verified middleware, Fortify routes, a resend page and handling email changes.
Authentication & security·
Laravel Fortify Tutorial for Inertia AppsA Laravel Fortify tutorial for Inertia apps: install Fortify, pick features, render Inertia pages and wire up login, registration and password reset.
SaaS & operations·
Local Laravel Subdomains with Laravel HerdSet up Laravel Herd subdomains for a multi-tenant app: .test domains, herd link and herd secure, APP_URL and SESSION_DOMAIN, alternatives and common pitfalls.
Users & permissions·
Permission-Based Menus in Laravel and InertiaHandle Laravel Inertia permissions on the frontend: define menu items with a permission, filter them on the server and render only what each user can open.
Architecture & code quality·
Larastan and Pint for Laravel Code QualitySet up Larastan and Pint in a Laravel project: code style presets, PHPStan levels, baselines, Laravel-specific rules and a simple local and CI workflow.
SaaS & operations·
Backups for a Multi-Database Laravel SaaSA Laravel database backup strategy for database-per-tenant SaaS apps: what to back up, dumping every tenant, retention, and restoring a single customer.
Multi-tenancy·
Laravel Multi-Tenancy with SubdomainsA Laravel multi-tenancy subdomain guide for stancl/tenancy: identification middleware, central domains, tenant routes, sessions, wildcard DNS and links.
Multi-tenancy·
Queued Jobs in a Multi-Tenant Laravel AppHow Laravel tenancy queue jobs keep their tenant: the stancl queue bootstrapper, a central jobs table, dispatching per tenant, URLs, locks and scheduling.
Authentication & security·
Passkeys in Laravel: Passwordless LoginHow Laravel passkeys work with WebAuthn and Fortify: the register and login flows, relying party and allowed origins for subdomains, and password fallback.
Authentication & security·
Password Rules and Confirmation in LaravelLaravel password rules explained: Password::defaults(), length vs complexity, breached-password checks, passwordrules hints and password confirmation.
Users & permissions·
Laravel Permissions Seeder with Config FilesBuild a Laravel permissions seeder driven by config files: file layout, idempotent seeding, role defaults, pruning old permissions, tenants and safe deploys.
Users & permissions·
Laravel Default Roles: Protecting System RolesDefine Laravel default roles in an enum, seed them safely and block renames and deletes on the server with a policy, a model guard and clear UI badges.
Users & permissions·
Laravel Roles and Permissions with SpatieA practical Laravel Spatie permission guide: roles, permissions and guards, assigning and checking them, super admins, caching, seeding and Inertia UI checks.
SaaS & operations·
Laravel SaaS Boilerplate vs Building from ScratchShould you start from a Laravel SaaS boilerplate or build from scratch? The work involved, hidden costs on both sides and a checklist to help you decide.
SaaS & operations·
Laravel SaaS Launch ChecklistA SaaS launch checklist for Laravel apps: product, security, billing, legal pages, operations, monitoring and support, with links to detailed guides for each.
SaaS & operations·
Laravel SaaS Starter Kit: A Complete Buyer's GuideWhat a Laravel SaaS starter kit should include, how to compare kits and what to check before you buy: multi-tenancy, auth, permissions, license and updates.
SaaS & operations·
Laravel Stripe Subscriptions for a SaaSAdd Laravel Stripe subscription billing to a multi-tenant SaaS with Cashier: bill the tenant, Checkout, webhooks, plan gating, the billing portal and tax.
Architecture & code quality·
Testing a Laravel SaaS with PestLaravel Pest testing for SaaS apps: what to test, setup, feature tests, permissions, Inertia pages, datasets, fakes, architecture tests and a fast suite.
Architecture & code quality·
The Service Layer Pattern in LaravelThe Laravel service layer explained: what belongs in a service class, how to use transactions, when to send emails and jobs, and mistakes to avoid.
Users & permissions·
Laravel Super Admin Role with Spatie PermissionBuild a Laravel super admin role with Spatie: Gate::before or Gate::after, checks the bypass misses, the first super admin and how to stop privilege escalation.
Multi-tenancy·
Tenant-Aware Cache and File Storage in LaravelHow Laravel tenancy cache and file storage stay separate per tenant: cache tags, supported stores, calls that skip scoping, tenant disks, S3 and public URLs.
Multi-tenancy·
Custom Domains for Tenants in LaravelAdd a Laravel tenant custom domain the safe way: storing and verifying domains, customer DNS, TLS certificates on demand, sessions, passkeys and links.
Multi-tenancy·
Tenant Migrations and Seeders in LaravelLaravel tenant migrations and seeders with stancl/tenancy: central vs tenant folders, tenants:migrate, safe deployments, idempotent seeders and fixing failures.
Architecture & code quality·
Thin Controllers in LaravelHow to write Laravel thin controllers: the four jobs a controller has, Form Requests, authorization attributes, clean responses and a fat controller refactor.
Authentication & security·
Two-Factor Authentication in LaravelLaravel two factor authentication with Fortify: how TOTP works, the enable, QR code and confirm flow, recovery codes, the login challenge and security tips.
Architecture & code quality·
Generate TypeScript Types from PHP in LaravelUse the Laravel TypeScript transformer to turn PHP classes, enums and laravel-data objects into TypeScript types, with setup, attributes, writers and CI tips.
Users & permissions·
User Invitations in Laravel with Signed URLsBuild a secure Laravel user invitation flow with temporary signed URLs, the signed middleware, queued emails, expiring single-use links and an accept page.
Localization·
Laravel User Locale: Per-User Language SettingsStore a Laravel user locale, validate and save the choice, apply it on every request and send emails and queued notifications in each user's language.
Localization·
Translating Validation Messages in LaravelLaravel validation messages translation explained: the lookup order, lang files for every locale, field names, custom messages, arrays and custom rules.
Inertia & frontends·
Laravel SaaS Dashboard with Vue and InertiaA Laravel Vue Inertia walkthrough for SaaS dashboards: typed props, layout breadcrumbs, a debounced search, useForm, modal refs and permission checks in Vue 3.
Architecture & code quality·
Modular Laravel Architecture for SaaSA practical guide to Laravel modular architecture for SaaS: feature modules, service providers that load routes, one-way dependencies and adding a module.
Multi-tenancy·
How to Build a Multi-Tenant SaaS with LaravelSingle database, schema or database per tenant? How database-per-tenant multi-tenancy works in Laravel with stancl/tenancy, plus the pitfalls to avoid.
Multi-tenancy·
stancl/tenancy Tutorial: Getting StartedA hands-on stancl tenancy tutorial: install stancl/tenancy 3, create a Tenant model, add tenant migrations and routes, and create your first tenant database.
SaaS & operations·
Suspending Customer Accounts in a SaaSHow to suspend a SaaS account the right way: status fields, blocking middleware, what stays reachable, background jobs, customer messages and reactivation.