PHPackages                             genealabs/laravel-multi-step-progressbar - 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. genealabs/laravel-multi-step-progressbar

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

genealabs/laravel-multi-step-progressbar
========================================

10.0.0(3y ago)63278.0k↓71.8%3MITPHPCI passing

Since Jun 20Pushed 3mo agoCompare

[ Source](https://github.com/mikebronner/laravel-multi-step-progressbar)[ Packagist](https://packagist.org/packages/genealabs/laravel-multi-step-progressbar)[ RSS](/packages/genealabs-laravel-multi-step-progressbar/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (3)Versions (9)Used By (0)

Multi-Step Progressbar for Laravel
==================================

[](#multi-step-progressbar-for-laravel)

[![Screen Shot 2020-07-23 at 1 39 06 PM](https://user-images.githubusercontent.com/1791050/88336503-f77f9000-cce9-11ea-95ed-b8ff1fb7fb26.png)](https://user-images.githubusercontent.com/1791050/88336503-f77f9000-cce9-11ea-95ed-b8ff1fb7fb26.png)

Version Compatibility
---------------------

[](#version-compatibility)

LaravelPHPPackage10.x8.2-8.51.x11.x8.2-8.51.x12.x8.2-8.51.x13.x8.2-8.51.xInstallation
------------

[](#installation)

```
composer require genealabs/laravel-multi-step-progressbar
```

Implementation
--------------

[](#implementation)

The progress-bar is implemented via a Blade component:

```

```

### Model

[](#model)

The `$record` model represents the model that stores the information submitted in the various forms traversed. It will be passed into each view of the steps defined in `$stepData` and can be used to fill in the forms on each step. What it exactly contains is completely up to you.

### Step Data

[](#step-data)

`$stepData` is a collection of `ProgressbarItem` model instances.

#### Data Points

[](#data-points)

Each step has the following properties:

- **step**: the number of the step, presented in sequence.
- **url**: the URL of the view to load for the given step.
- **title**: will be displayed on the active step in the progress-bar. Leave blank to not show anything.
- **description**: will be displayed on the active step in the progress-bar. Leave blank to not show anything.
- **canJumpAhead**: designates if the user can jump to the step once it has been filled out.

#### Collection

[](#collection)

You can create this as follows:

```
$stepData = collect()
    ->push((new ProgressbarItem)->fill([
        "step" => 1,
        "url" => route("wizards.record-analysis.edit", ["record" => $record, "step" => "1"]),
        "title" => "Create Document",
        "description" => "",
        "canJumpAhead" => true,
    ]))
    ->push((new ProgressbarItem)->fill([
        "step" => 2,
        "url" => route("wizards.record-analysis.edit", ["record" => $record, "step" => "2"]),
        "title" => "Search Sources",
        "description" => "",
        "canJumpAhead" => (bool) $record->title,
    ]))
    ->push((new ProgressbarItem)->fill([
        "step" => 3,
        "url" => route("wizards.record-analysis.edit", ["record" => $record, "step" => "3"]),
        "title" => "Create Source",
        "description" => "",
        "canJumpAhead" => ($record->source || $record->wherein),
    ]))
    // ...
```

Configuration
-------------

[](#configuration)

```
