Skip to content

Commit

Permalink
Merge pull request #33 from bayareawebpro/dev
Browse files Browse the repository at this point in the history
Interface Expansion
  • Loading branch information
bayareawebpro committed Sep 15, 2022
2 parents ce5341d + 6c6f3a1 commit 3a4ea41
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 284 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ Set a field value from the session form state.

Will be passed the full array of validated data for modification before saving. Callback MUST return an array to be saved.

#### `save(array $data)`

Merge and save key/values array into the session.

#### `withData(array $data)`

Merge additional non-form data provided to views and responses.

#### `currentStep()`

Get the current saved step number.
Expand Down Expand Up @@ -221,6 +229,10 @@ Reset the form state to defaults passing an optional array of data to seed.

Tap into the builder instance with invokeable classes that will be pass an instance of the form.

#### `renderResponse(array $data)`

Render the response manually / sidestep the validation and saving Logic. Useful for additional routes that will update the session but do not require incrementing the current step.

#### `toCollection`

Get the array representation of the form state as a collection.
Expand Down Expand Up @@ -325,6 +337,7 @@ use BayAreaWebPro\MultiStepForms\MultiStepForm as Form;
$form = Form::make();
$form->namespaced('onboarding');
$form->canNavigateBack(true);
$form->withData(['key' => $value]);
```

#### JSON Response Schema
Expand Down
34 changes: 0 additions & 34 deletions phpunit.xml.bak

This file was deleted.

Loading

0 comments on commit 3a4ea41

Please sign in to comment.