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

A few questions about how to use the package #12

Open
mohsen-zanjani opened this issue Jun 24, 2021 · 1 comment
Open

A few questions about how to use the package #12

mohsen-zanjani opened this issue Jun 24, 2021 · 1 comment

Comments

@mohsen-zanjani
Copy link

Hello
Thanks for your interesting package.

I know the documentation is not complete yet, but I have some questions about how to use the package.

  1. I'm confused about creating view (blade) files and how to specify URLs for action forms, as well as next or previous buttons. Of course, I almost solved this, but I do not know exactly what the best method is, and I hope a clearer example will be given (especially for Blade).

  2. The next question is how to use this form wizard in editing mode? What should we do if we want to edit an entity that has already been created and stored in DB? How to access the desired Model and share it between the various step forms? Especially based on Laravel model binding.

  3. Suppose we have defined a Wizard to register a Post, which consists of several steps (PostWizard), now if on our website it is possible for both regular users and admins (in the admin panel) to insert a post How can we use this PostWizard in both sections? (With different routes)
    For example
    exampl.com/user/wizard/post
    exampl.com/admin/wizard/post

  4. From there, access to the wizard is possible through the ID and the address wizard/example/wizardId, now if one person comes and completes part of a form (for example, wizard number 5) and another person in his own browser enters the desired address Enter (wizard/example/5) seems to have access to information entered by the previous user. Isn't this a problem? Maybe I misunderstood this!

Thank You

@thoresuenert
Copy link
Contributor

  1. the concept is based on redirects and same url convention. to don't need to manage any url.
  2. this is not provided by the package, you to work around that.
  3. that looks possible via prefix configuration have look in the Acarnist Class, there you find the route logic.
  4. you can add the current user to the wizards table and build your own WizardRepository https://github.com/laravel-arcanist/arcanist/blob/ecb3f51c5b63222f1c40d700218f09699f5b6f14/src/Repository/DatabaseWizardRepository.php#L20-24 and https://github.com/laravel-arcanist/arcanist/blob/ecb3f51c5b63222f1c40d700218f09699f5b6f14/src/Repository/DatabaseWizardRepository.php#L61-73

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

No branches or pull requests

2 participants