zareismail / nova-wizard
A Laravel Nova tool.
Installs: 17 250
Dependents: 1
Suggesters: 0
Security: 0
Stars: 14
Watchers: 3
Forks: 7
Open Issues: 13
Language:Vue
Requires
- php: >=7.1.0
- dev-master
- v0.1.1
- 0.1.0
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/minimist-1.2.8
- dev-dependabot/npm_and_yarn/eventsource-and-laravel-mix--removed
- dev-dependabot/npm_and_yarn/json5-and-laravel-mix-2.2.3
- dev-dependabot/npm_and_yarn/tough-cookie-and-laravel-mix--removed
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/async-2.6.4
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
This package is auto-updated.
Last update: 2024-12-11 08:25:27 UTC
README
A wizard form for the Laravel Nova
Table of Contents
Introduction
This package gives you the ability to creating
or updating
a resource step by step and validating
and storing
resources on each step.
Installation
To get started with nova-wizard
run the below command:
composer require zareismail/nova-wizard
Resource Configurations
To use, your resource class should implement the Wizard
interface. Then for creating each step use the Step
class like the following:
use Zareismail\NovaWizard\Contracts\Wizard;
use Zareismail\NovaWizard\Step;
class Supply extends Resource implements Wizard
{
return [
(new Step(__('Step One'), [
// some fields
])->withToolbar()
new Step('Step Two', [
]),
new Step(__('Step Three'), function() {
return [
];
}),
];
}
Now; your source automatically displays wizard form to you.
Storing
By default; each step, except the last, will store in the session. if you need to store data into the database after a specific step you should call the Checkpoint
method on that step. now, checkpoint step and all steps after it will be store in the DB
.
Ignore Wizard On Update
For ignoring wizard-form
on the update page, your resource should implement the Zareismail\NovaWizard\Contracts\IgnoreUpdateWizard
.