rob-lester-jr04/laravel-wizard

Wizard component for laravel5.

dev-master 2018-10-30 21:40 UTC

This package is auto-updated.

Last update: 2024-10-29 04:47:50 UTC


README

Latest Stable Version Latest Unstable Version

simple laravel step-by-step wizard

Required

php ^7.0
laravel ^5.5

Install

Require the package

$ composer require rob-lester-jr04/laravel-wizard

Optional:

Copy the config file to your config directory.

$ php artisan vendor:publish --provider="Lester\LaravelWizard\ServiceProvider" --tag=config
'view' => 'wizard',
	
'routing' => [
	'get'		=> 'wizard',
	'post'		=> 'wizard.post'
],
	
'storage' => [
	'key'		=> 'wizard',
	'method'	=> 'session'
]

Example/How

Create a controller

$ php artisan make:controller WizardController

We used WizardController as an example, you can choose what you need to for your project.

Include the contract on the controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Lester\LaravelWizard\Contracts\TakesSteps;

class WizardController extends Controller
{
	use TakesSteps;
	
	//
}

Create Step

$ php artisan make:step MyFirstStep

License

Laravel wizard is open-sourced software licensed under the MIT license