PHPackages                             vallerydelexy/laravel-wizard - 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. vallerydelexy/laravel-wizard

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

vallerydelexy/laravel-wizard
============================

A web setup wizard for Laravel application.

4.x-dev(1y ago)01MITPHPPHP &gt;=8.2

Since Sep 7Pushed 1y agoCompare

[ Source](https://github.com/vallerydelexy/laravel-wizard)[ Packagist](https://packagist.org/packages/vallerydelexy/laravel-wizard)[ Docs](https://github.com/vallerydelexy/laravel-wizard)[ Patreon](https://www.patreon.com/vallerydelexy)[ RSS](/packages/vallerydelexy-laravel-wizard/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelogDependencies (4)Versions (1)Used By (0)

Laravel Wizard
==============

[](#laravel-wizard)

[![Latest Version on Packagist](https://camo.githubusercontent.com/63af54b023c961a1b59de2e7f5fe1a43708526583e72293610a152580d87926a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76616c6c65727964656c6578792f6c61726176656c2d77697a6172643f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vallerydelexy/laravel-wizard)[![Software License](https://camo.githubusercontent.com/c090e080484e2a2bc766446291d04437db823929042bf614b26a1643660ddf6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e3f7374796c653d666c61742d737175617265)](LICENSE)[![GitHub Tests Action Status](https://camo.githubusercontent.com/382be2f87170c3ebf38b06989ae652a091838cc6003d7d21bb55a2f5b824ed0f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f76616c6c65727964656c6578792f6c61726176656c2d77697a6172642f74657374732e796d6c3f6272616e63683d342e78266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/vallerydelexy/laravel-wizard/actions/workflows/tests.yml?query=branch%3A4.x)[![Style CI Build Status](https://camo.githubusercontent.com/1b8568b468be0a3f873118bacff1e2a2af87f64a387d6faf74bb701d3c0423cc/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3139303837363732362f736869656c643f7374796c653d666c61742d737175617265)](https://github.styleci.io/repos/190876726)[![Total Downloads](https://camo.githubusercontent.com/d91b5ac4000acaa0b3208a32b1154f4da3baa736798c845680139d646f2bf8c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76616c6c65727964656c6578792f6c61726176656c2d77697a6172643f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vallerydelexy/laravel-wizard)

A web setup wizard for Laravel application.

> This package is adapted from [smajti1/laravel-wizard](https://github.com/smajti1/laravel-wizard).

[![Laravel wizard main image.](docs/laravel-wizard-main-image.jpg)](docs/laravel-wizard-main-image.jpg)

Table of Contents
-----------------

[](#table-of-contents)

- [Laravel Wizard](#laravel-wizard)
    - [Table of Contents](#table-of-contents)
    - [Version Compatibility](#version-compatibility)
    - [Install](#install)
    - [Usage](#usage)
        - [1. Generate controller and wizard steps](#1-generate-controller-and-wizard-steps)
        - [2. Set steps](#2-set-steps)
        - [3. Install wizard steps CSS package](#3-install-wizard-steps-css-package)
    - [Cache](#cache)
        - [Database Driver](#database-driver)
        - [Disable Cache](#disable-cache)
    - [Controller](#controller)
        - [Setting Configuration](#setting-configuration)
    - [Customize View](#customize-view)
    - [Step](#step)
        - [Get cached data](#get-cached-data)
        - [Step repository](#step-repository)
        - [Upload Files](#upload-files)
        - [Skip step](#skip-step)
        - [Passing data to views](#passing-data-to-views)
        - [Save data on another step](#save-data-on-another-step)
        - [Set relationships model](#set-relationships-model)
    - [Commands](#commands)
    - [Sponsor](#sponsor)
    - [Credits](#credits)
    - [License](#license)

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

[](#version-compatibility)

Laravel WizardLaravelPHP1.0.x5.5^7.01.1.x^5.6^7.1.32.0.x,2.1.x^5.6 | ^6.x^7.1.32.2.x^5.6 | ^6.x | ^7.x^7.1.32.3.x&gt;=5.6 | &lt;=9.0&gt;=7.1.3 | &lt;=8.23.x&gt;=9.0&gt;=8.14.x&gt;=11.0&gt;=8.2Installation
------------

[](#installation)

Install the package via composer:

```
composer reqre vallerydelexy/laravel-wizard
```

Publish config:

```
php artisan vendor:publish --tag=wizard-config
```

Usage
-----

[](#usage)

### 1. Generate controller and wizard steps

[](#1-generate-controller-and-wizard-steps)

Now you can qckly generate the wizard controller and the wizard steps:

```
php artisan make:wizard User NameStep,EmailStep
```

This command generates the `UserWizardController`, `NameStep`, and `EmailStep` class, and appends the wizard route to `routes/web.php`.

*routes/web.php*

```
use App\Http\Controllers\UserWizardController;
use Illuminate\Support\Facades\Route;
use vallerydelexy\LaravelWizard\Facades\Wizard;

...

Wizard::routes('/wizard/user', UserWizardController::class, 'wizard.user');
```

> If you can't use auto append route, you can set `config/wizard.php` attribute `append_route` to `false`.

### 2. Set steps

[](#2-set-steps)

This is generated NameStep class, you can to `model` method set the model, to `rules` method set form validation, and save `$data` to your database via the `saveData` method, for example:

*app/Steps/User/NameStep.php*

```
