Download the PHP package dgtlinf/user-onboarding without Composer

On this page you can find all versions of the php package dgtlinf/user-onboarding. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package user-onboarding

User Onboarding for Laravel 10+

Latest Version on Packagist GitHub Tests Action Status Total Downloads PHP Version Laravel Version

A lightweight, stateless user onboarding flow manager for Laravel applications. Define onboarding steps entirely in code or in configuration, use middleware to restrict access, and listen to onboarding events — all without a database.


🚀 Installation

Install the package via Composer:

Then publish the config file and installation assets using the included install command:

This will publish the configuration file:


⚙️ Defining Flows

You can define your onboarding steps in two different ways — depending on whether your flow is static (defined in config) or dynamic (defined programmatically).

1. Config-Based Flows (Recommended)

This is the most common approach. Define your flows in config/user-onboarding.php:

The middleware and facade will automatically use these definitions:

2. Dynamic Flows (Programmatic)

You can also define steps directly in code — perfect for custom setups, role-based flows, or feature flags.

In a Controller

In AppServiceProvider (Global Logic)

You can register a reusable macro for dynamic onboarding flows:

Now anywhere in your app, you can call:


🧬 Basic Usage

If you prefer configuration-based flows, use:


🛡️ Middleware Protection

You can easily protect routes to ensure users can only access them after completing onboarding.

Protect Entire Routes

If a user has not completed onboarding, they’ll be redirected to /onboarding (or your configured path).

Require a Specific Step

If the user hasn’t completed the verify_email step, the middleware denies access.


🤓 Creating a Custom Middleware

By default, this package includes the middleware Dgtlinf\\UserOnboarding\\Http\\Middleware\\EnsureUserOnboardingStepCompleted.

You can register it manually or create your own to customize the behavior (for example, JSON vs. redirect responses).

1. Using the built-in middleware

Register it in your app/Http/Kernel.php if not already auto-discovered:

Then use it in your routes:

2. Creating your own middleware

If you need different behavior (e.g. API response instead of redirect), you can create your own middleware and use the package’s API directly:

Then register and use it:

Tip: You can also use this pattern to create per-role or per-guard middleware variants:


🧬 Example Workflow (Blade or Inertia)

When a user tries to access a protected route, the middleware redirects them to /onboarding. You can use the flow object to determine which step to render next.

Controller Example

Inertia/Vue Example

Blade Example

When a user completes a step (e.g., submits a form):

The next time the onboarding view loads, the next step will automatically render.


🧱 Listening to Events

The package dispatches the following events automatically:

Event Description
OnboardingStarted Fired when a flow begins via UserOnboarding::start()
StepCompleted Fired when a step is completed manually or programmatically
OnboardingCompleted Fired when all steps are completed

Example Listener


📡 Events Overview

Each event carries the $user and $flow (and $step when relevant).


🥉 Example Use Cases


⚙️ Publishing & Customization

You can re-publish configuration anytime:


🧮 Tech Notes


🖦 License

MIT License © Digital Infinity


All versions of user-onboarding with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0
spatie/laravel-package-tools Version ^1.92
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dgtlinf/user-onboarding contains the following files

Loading the files please wait ...