spatie/laravel-onboard
Define and track user onboarding steps in Laravel. Register steps with titles, links, CTAs, and completion rules, then query a user’s onboarding progress (in progress/completed) and render a customizable checklist in your views.
laravel-model-states). Compatibility with older Laravel versions (e.g., 9.x) is likely but should be validated.steps table and a pivot table for user-step relationships. Migration files are provided, but the TPM must ensure schema conflicts with existing user models (e.g., custom users table namespaces or polymorphic relations).auth()->user()). Custom auth systems (e.g., API tokens, SSO) would require adapter layers.laravel-model-states for step tracking. While robust, this introduces an indirect dependency that must be tested for edge cases (e.g., concurrent step updates, race conditions).steps()->where...) could become a bottleneck. The TPM should evaluate caching strategies (e.g., Redis) for step data or lazy-loading.App\Models\User vs. App\Models\Customer)? If so, how will the package’s completeIf closures reference non-standard attributes?laravel-permission). The package’s facade-based API aligns with Laravel’s service container and dependency injection.composer require spatie/laravel-onboard
php artisan vendor:publish --provider="Spatie\Onboard\OnboardServiceProvider"
steps and model_has_steps tables.boot() method or a dedicated config file (e.g., config/onboarding.php).composer.json for minimum PHP/Laravel requirements.App\Models\TeamMember), update the package’s model binding in the service provider.spatie/laravel-model-states) for version compatibility.laravel-model-states is a minor dependency but should be version-locked to avoid compatibility issues.completeIf closures (e.g., logging model attributes).Onboard::resetStepsFor(user)).model_has_steps pivot table could grow. Consider:
completeIf conditions are never met. Mitigate with:
DB::transaction(function () {
auth()->user()->onboarding()->completeStep($stepId);
});
Onboard::addStep() syntax).How can I help you explore Laravel packages today?