- How do I install 3neti/form-flow in a Laravel application?
- Install the package with Composer using the package name 3neti/form-flow, then follow the repository setup notes for any configuration or publishing steps. If your application disables package discovery, register the service provider manually. Check the package's composer.json constraints before installing to confirm compatibility with your Laravel and PHP versions.
- Which Laravel versions does 3neti/form-flow support?
- The exact Laravel and PHP version constraints are defined in the package's composer.json. Check the require section on Packagist or in the repository before installing. If you maintain an older Laravel release, test the package in a staging branch first to confirm compatibility.
- How do I define a multi-step form flow with the fluent API?
- You define each step and its transitions using the package's fluent API, keeping the flow definition in one place instead of scattering logic across controllers. Steps can include validation rules and guards that control whether a user may advance. Conditional branching and skip logic let you route users through different paths based on their answers, while the flow handles forward and backward movement.
- How does per-step validation work in 3neti/form-flow?
- Each step can carry its own validation rules and guards, so submitted data is checked before the flow advances. This keeps validation close to the step definition instead of duplicating it in every controller action. If validation fails, the user remains on that step and the errors can be displayed in your Blade or Livewire view.
- How is form state persisted between requests?
- The package uses session-backed state persistence to keep partially completed form data across requests. That allows users to move forward and backward through the flow without losing earlier input. For long-lived or cross-device resumption, you would need to add your own persistence layer on top.
- Can I skip steps or branch conditionally in a form flow?
- Yes, the package supports conditional branching and skip logic as part of the flow definition. You can route users to different steps based on submitted data or guards and skip steps that do not apply. This is useful for onboarding and checkout flows where not every user needs every step.
- Does 3neti/form-flow work with Blade and Livewire?
- The package is described as Blade and Livewire friendly, so you can render steps and navigation in your existing views. It focuses on flow and state logic rather than imposing a UI layer. That means you keep control over markup, styling, and Livewire component structure.
- How do I test a multi-step form flow in Laravel?
- Test flows with Laravel's HTTP testing tools by posting data to each step and asserting the expected redirects, session state, and validation errors. Because progress is session-backed, you can assert the session contains the expected step data after each request. Keep separate tests for guards and conditional branching so regressions are easy to spot.
- Is 3neti/form-flow suitable for production checkout and onboarding flows?
- It can be a good fit for server-side checkout and onboarding wizards because steps, validation, and guards live in a structured flow definition. Session-backed persistence is simple, but for payments or regulated data you should review how session storage, CSRF protection, and data retention are handled in your application. Test edge cases such as expired sessions and back-button navigation before going live.
- What are alternatives to 3neti/form-flow for Laravel multi-step forms?
- Alternatives include building custom controller-based wizards, using Livewire components to manage step state, or adopting another Laravel wizard package. The main differentiator of 3neti/form-flow is its fluent step and transition API with per-step validation and guards. Compare maintenance activity, Laravel version support, and state persistence needs before choosing.