---
title: "Onboarding for Laravel — docs | Roundly"
description: "Developer docs for Onboarding for Laravel: stateless flows and steps, declarative rules, optional steps, sections, route middleware, events and testing."
url: https://roundly-consulting.com/open-source/docs/onboarding-for-laravel
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

Open source

# Onboarding for Laravel

Install

`composer require roundly-consulting/onboarding-for-laravel`

Requires: PHP ^8.4 · Laravel ^12.0|^13.0

[GitHub](https://github.com/roundly-consulting/onboarding-for-laravel) [Packagist](https://packagist.org/packages/roundly-consulting/onboarding-for-laravel) [Donate (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Patreon](https://www.patreon.com/cw/roundly)

## Overview

Onboarding for Laravel describes onboarding as flows of ordered steps and works out each user’s progress on the fly from the data you already have — no tables, no migrations, no config file. Register flows once, then ask any model for its next step, completion percentage, sections or a JSON-ready summary; gate routes behind completion with one middleware and announce progress as events when you choose. MIT-licensed, stateless by design and built only on Laravel and our own package toolkit — no third-party dependencies.

### What you get

#### Zero tables, zero config

Progress is derived live from the data you already have — no migrations, no config file, no stale boolean flags.

#### Many flows, one resolver

Register keyed flows or reusable flow classes, and let one resolver pick the right journey for each user.

#### Declarative steps

completeWhenFilled(), completeWhenTrue() and completeWhenHas() cover the common cases; closures handle the rest.

#### Optional steps, sections & position

Optional steps never block completion; grouped sections, “step 3 of 7” and resume support come built in.

#### Route guard & frontend-ready

The onboarding middleware sends unfinished users to their first incomplete required step; toArray() and typed DTOs feed your UI.

#### Events & opt-in persistence

record() announces StepCompleted and FlowCompleted; bind your own store for dismissible steps and to stop re-announcing saved completions.

#### Facade or DI, with a real fake

One Onboarding facade over an injectable OnboardingManager; Onboarding::fake() captures events, records dismissals and seeds a store.

### Documentation

#### [Installation](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/installation.md)

Install via Composer — there is no config, no migration and no view to publish. Check the wiring with php artisan about.

#### [Core concepts](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/core-concepts.md)

Flows, steps, subjects and the manager — how progress is derived live from your data instead of being stored.

#### [The Onboarding facade](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/facade.md)

The full Onboarding facade — register flows, read a per-subject copy with for(), pick flows with a resolver and plug in a store.

#### [Without the facade](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/without-facade.md)

Skip the facade: inject OnboardingManager for the same API without static calls. The package has no action classes.

#### [Registering flows](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/registering-flows.md)

Register default and keyed flows, build them fluently, package reusable flow classes and manage the registry.

#### [Defining steps](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/steps.md)

Build steps with titles, CTAs, targets, metadata, keys and ordering; decide completion and exclusion with closures.

#### [Declarative conditions](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/declarative-conditions.md)

completeWhenFilled(), completeWhenTrue(), completeWhenHas() and their exclude counterparts — one-line rules, no closures.

#### [Optional steps](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/optional-steps.md)

Guide users with nice-to-have steps that count toward progress but never block completion.

#### [Preparing a model](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/model-trait.md)

Add GetsOnboarded to a model to read its flow, choose its default key and use null-safe one-line readers.

#### [Reading progress](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/reading-progress.md)

Completion, the current step, percentages, position and resume — the full Flow reading API with a reference table.

#### [Binding the subject](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/binding-the-subject.md)

Evaluate a flow for a specific model or the logged-in user — every Onboarding::for() call returns its own bound copy.

#### [Choosing the flow per subject](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/flow-resolver.md)

Register one resolver that maps each subject to its flow key, with an automatic fallback to the default flow.

#### [Route middleware](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/middleware.md)

Gate routes behind onboarding: unfinished users are redirected to their first incomplete required step, with no redirect loops.

#### [Sections](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/sections.md)

Group steps into named sections with their own progress — the building block for multi-part setup wizards.

#### [Localizable copy](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/localization.md)

Use translation keys as step titles and CTAs — resolved at read time, with a switch to force or disable it.

#### [Serializing for an API](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/serialization.md)

Hand a flow to your frontend as a JSON-ready array or as typed FlowData, StepData and SectionData DTOs.

#### [Events](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/events.md)

Announce progress with record() — StepCompleted and FlowCompleted for analytics, notifications or your own persistence.

#### [Persistence store](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/persistence.md)

Opt into dismissible optional steps and stop re-announcing saved completions by plugging your own OnboardingStore in with Onboarding::useStore().

#### [Extending & exceptions](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/extending.md)

Add fluent helpers with macros, know every extension point and handle the typed InvalidFlowException and InvalidStoreException.

#### [Artisan commands](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/commands.md)

List registered flows, inspect one flow’s steps and check the package wiring from the terminal.

#### [Testing](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/testing.md)

Onboarding::fake() captures events, records dismissals and seeds an in-memory store — or test progress straight from model data.

#### [Requirements](https://roundly-consulting.com/open-source/docs/onboarding-for-laravel/requirements.md)

PHP 8.4+ and Laravel 12 or 13 — no PHP extensions, no database tables and no config file.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source.md)
