Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add has step checks #78

Merged
merged 4 commits into from
Apr 5, 2023
Merged

Conversation

Bird87ZA
Copy link
Contributor

@Bird87ZA Bird87ZA commented Apr 3, 2023

I've added functionality to be able to see if there are succeeding or preceding steps in the wizard.

This is useful because it allows you to have the following:

@if ($this->hasPreviousStep())
    <button wire:click="previousStep">
        {{ __('Back') }}
    </button>
@endif

@if ($this->hasNextStep())
    <button wire:click="nextStep">
        {{ __('Next') }}
    </button>
@else
    <button wire:click="submit">
        {{ __('Create') }}
    </button>
@endif

This is a new PR related to #76

Copy link
Member

@freekmurze freekmurze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only a tiny remark on the tests

tests/WizardTest.php Outdated Show resolved Hide resolved
@freekmurze freekmurze merged commit 5ff6ef2 into spatie:main Apr 5, 2023
@freekmurze
Copy link
Member

Thank you!

@Bird87ZA Bird87ZA deleted the add-has-step-checks branch April 5, 2023 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants