PHPackages                             felixdorn/onboard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. felixdorn/onboard

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

felixdorn/onboard
=================

Track user onboarding steps.

0.7.0(3y ago)127MITPHPPHP ^8.1

Since Jan 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/felixdorn/onboard)[ Packagist](https://packagist.org/packages/felixdorn/onboard)[ RSS](/packages/felixdorn-onboard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (16)Used By (0)

Onboard for Laravel
===================

[](#onboard-for-laravel)

[![Tests](https://github.com/felixdorn/onboard/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/felixdorn/onboard/actions/workflows/tests.yml)[![Formats](https://github.com/felixdorn/onboard/actions/workflows/formats.yml/badge.svg?branch=main)](https://github.com/felixdorn/onboard/actions/workflows/formats.yml)[![Version](https://camo.githubusercontent.com/583542f38689b35d6207c13eae00169f00b05b92b1bc2511e3421c0b4404a5a0/68747470733a2f2f706f7365722e707567782e6f72672f66656c6978646f726e2f6f6e626f6172642f76657273696f6e)](//packagist.org/packages/felixdorn/onboard)[![Total Downloads](https://camo.githubusercontent.com/3e559cc0e07c40dd8ad78905983e339266ae8da987bfafa2e6beb8f31b45f2b1/68747470733a2f2f706f7365722e707567782e6f72672f66656c6978646f726e2f6f6e626f6172642f646f776e6c6f616473)](//packagist.org/packages/felixdorn/onboard)[![License](https://camo.githubusercontent.com/3f95af74d98951c1ba98f7e565bd905e753228b12fa2658d3ad5709ed1d83e8e/68747470733a2f2f706f7365722e707567782e6f72672f66656c6978646f726e2f6f6e626f6172642f6c6963656e7365)](//packagist.org/packages/felixdorn/onboard)

Installation
------------

[](#installation)

> Requires [PHP 8.1+](https://php.net/releases) and Laravel 8.x or 9.x

You can install the package via composer:

```
composer require felixdorn/onboard
```

Publish the `ResumeOnboarding` middleware to your `app/Http/Middleware` directory:

```
php artisan onboard:middleware
```

> **If you're using Inertia**, you need to return false when `$request->inertia()` is true in the skip method of the middleware.

```
    public function skip(Request $request): bool
    {
        if ($request->inertia()) {
            return false;
        }

        return parent::skip($request);
    }
```

Add it to your `app/Http/Kernel.php`:

```
    // ...

    protected $middlewareGroups = [
        'web' => [
            // ...
            \App\Http\Middleware\ResumeOnboarding::class
        ]
    ]
```

Then, make sure that your `User` model uses `HasOnboarding`.

```
use Felix\Onboard\Concerns\HasOnboarding;

class User extends Authenticatable {
    use HasOnboarding;

    // ...
}
```

You're all set.

Usage
-----

[](#usage)

Add your onboarding steps in `app/Providers/AppServiceProvider.php`

> If you have a lot of steps, you may consider creating an `OnboardServiceProvider` (don't forget to register it in `config/app.php`).

```
use \App\Models\User;
use \Felix\Onboard\Facades\Onboard;

Onboard::add('verify_email')
    ->completedIf(function (User $user) {
        return $user->hasVerifiedEmail(); // or whatever
    })
    ->skipIf(function () {
        return $user->github_id != null;
    })
    ->route('verification.notice')
    ->allowRoutes(['verification.verify']);

class HomeController extends Controller {
    public function index(\Illuminate\Http\Request $request) {
        return [
            'steps' => $request->user()->onboarding()->toArray()
        ];
    }
}
```

**WARNING**: Be careful, closure are memoized (their result are cached) for the duration of a request. This should never be an issue in traditional apps, if you encounter problems, please let us know.

> You may call completedIf and skipIf many times, the step will be marked as completed or skipped if all the closures return true.

You may pass a closure to resolve a route lazily:

```
Onboard::add('create_team')
    ->route(fn () => route('teams.create'));
```

Globally allowed routes
-----------------------

[](#globally-allowed-routes)

Regardless of the state of the onboarding process, you may want the user to have access to certain urls, such as a logout page.

```
Onboard::allow(['/api/*']);

Onboard::allowRoutes(['logout', 'settings.billing']);
```

`Step::allow` and `Onboard::allow` make use of [`honda/url-pattern-matcher`](https://github.com/laravel-honda/url-pattern-matcher), check it out for more details about how to use pattern matching with Onboard.

Testing
-------

[](#testing)

```
composer test
```

**Onboard for Laravel** was created by **[Félix Dorn](https://twitter.com/afelixdorn)** under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~23 days

Total

14

Last Release

1458d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eeca3822ab1a1281e77e0c4f7bdb671c840417def9884107629952224ce42eb0?d=identicon)[felixdorn](/maintainers/felixdorn)

---

Top Contributors

[![felixdorn](https://avatars.githubusercontent.com/u/55788595?v=4)](https://github.com/felixdorn "felixdorn (36 commits)")

---

Tags

package

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/felixdorn-onboard/health.svg)

```
[![Health](https://phpackages.com/badges/felixdorn-onboard/health.svg)](https://phpackages.com/packages/felixdorn-onboard)
```

###  Alternatives

[xajax/xajax

Xajax is an open source PHP class library for easily creating powerful PHP-driven, web-based Ajax Applications. Using Xajax, you can asynchronously call PHP functions and update the content of your your webpage without reloading the page.

20710.7k](/packages/xajax-xajax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
