Onboarding your users is one of the most important things you can do in your SaaS or application. Spatie has created an onboard package for Laravel that lets you set up an onboarding flow for your application's users.

Add the Spatie\Onboard\Concerns\GetsOnboarded trait and Spatie\Onboard\Concerns\Onboardable interface to any model or class in your app, for example, the User model: class User extends Model implements \Spatie\Onboard\Concerns\Onboardable { use \Spatie\Onboard\Concerns\GetsOnboarded; ...

*/ ->completeIf(function (User $model) { return $model->profile->isComplete(); }); Onboard::addStep('Create Your First Post') ->link('/post/create') ->cta('Create Post') ->completeIf(function (User $model) { return $model->posts->count() > 0; }); Example Here's an example of how it's set up: use App\User; use Spatie\Onboard\Facades\Onboard; Onboard::addStep('Complete Profile') ->link('/profile') ->cta('Complete') ->completeIf(function (User $user) { return $user->profile->isComplete(); }); Onboard::addStep('Create Your First Post') ->link('/post/create') ->cta('Create Post') ->completeIf(function (User $user) { return $user->posts->count() > 0; }); You can then render this onboarding flow however you want in your templates: @if (auth()->user()->onboarding()->inProgress()) @foreach (auth()->user()->onboarding()->steps as $step) @if($step->complete()) {{ $loop->iteration }}.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners