Search by

roundly-consulting / onboarding-for-laravel

mihaliak

Define and track multiple onboarding flows for your Laravel application.

Package info

github.com/roundly-consulting/onboarding-for-laravel

pkg:composer/roundly-consulting/onboarding-for-laravel

Fund package maintenance!

Patreon

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-10-03 17:56 UTC

This package is auto-updated.

Last update: 2026-10-03 18:06:48 UTC


README

Onboarding for Laravel — Roundly open source

Latest release Tests Code style Donate Patreon Crypto

Onboarding for Laravel

Describe onboarding as flows of ordered steps and derive each user's progress on the fly from the data you already have — no tables, nothing to persist. Ask a model for its flow to get the next step, the completion percentage and a JSON-ready array for your frontend, and keep unfinished users on their current step with one middleware.

Installation

Requires PHP 8.4, Laravel 12 or 13.

composer require roundly-consulting/onboarding-for-laravel

Usage

Register a flow once, in a service provider's boot():

use App\Models\User;
use RoundlyConsulting\Onboarding\Facades\Onboarding;
use RoundlyConsulting\Onboarding\Flow;
use RoundlyConsulting\Onboarding\Step;

Onboarding::register(Flow::make('Profile Onboarding')->of([
    Step::make('Verify email')->route('verification.notice')->completeWhenFilled('email_verified_at'),
    Step::make('Upload photo')->cta('Upload now')->route('profile.photo')->completeWhenFilled('avatar_path'),
    Step::make('Add a bio')->optional()->completeIf(fn (?User $user) => filled($user?->bio)),
]));

Add GetsOnboarded to the model and read its progress:

use RoundlyConsulting\Onboarding\Traits\GetsOnboarded;

class User extends Authenticatable
{
    use GetsOnboarded;
}

$user->onboardingProgress();             // 33.33
$user->nextOnboardingStep()?->title;     // "Upload photo"
Onboarding::for($user)?->toArray();      // title, percentage, next step, every step

Send users who haven't finished to their current step:

Route::middleware(['auth', 'onboarding'])->group(function () {
    Route::get('/dashboard', DashboardController::class);
});

Documentation

The full documentation — configuration, every feature and its API, and testing — lives on our website: roundly-consulting.com/open-source/docs/onboarding-for-laravel

Release notes are in CHANGELOG.md. To contribute, see the contributing guide.

Support our work

This package is free and open source, built and maintained by Roundly Consulting. If it saves you time, please consider supporting our open-source work — a one-time donation, a monthly pledge on Patreon or a crypto donation helps fund maintenance, new features and new packages.

Donate to Roundly open source Become a patron on Patreon Donate crypto: BTC, ETH, BNB or SOL

License

The MIT License (MIT). Please see License File for more information.