ycs77 / laravel-wizard

A web Setup Wizard for Laravel application.
MIT License
122 stars 18 forks source link

Serialization of 'Illuminate\Http\UploadedFile' is not allowed #9

Closed onedios closed 5 years ago

onedios commented 5 years ago

I have three tabs, last tab is used to store documents(images) Next button is working fine but Prev button gives me this error.

also Is it possible we skip some steps ?

ycs77 commented 5 years ago
  1. Do you want to skip the steps?
  2. Can you provide detailed information and sample code?
onedios commented 5 years ago
  1. Yes some kind of flag used in UserStep for example to skip that step in session
  2. Sure

I have three tabs First tab shows user information Second tab his/her address Third tab is used to save image for that user

I moved image part into third tab because Next and Back button gave me this error, Still i am getting same error on back button.

I changed some codes in vendor folder (temporary)

in Step.php cacheProgress if($this->slug !== 'documents') { $cacheData[$this->slug] = $this->getRequestData($request); }

Reason i am getting this error In SessionStore.php Set method

$this->session->put($this->wizardKey, $data);

Rest of my codes are simple no validation no saving right now.

ycs77 commented 5 years ago

Hi! Thank you for the information. Now, I found a solution to set cache in config/wizard.php to false, but it doesn't work now, please wait for me to fix this.

ycs77 commented 5 years ago

But I can't solve the "Serialization of 'Illuminate\Http\UploadedFile' is not allowed" problem.

ycs77 commented 5 years ago

Fixed from #10

The difference between cache open and close is:

ycs77 commented 5 years ago

About the skip step: The current practice, as long as there is no input data and the rules are not set to require can skip step, and show instructions below the form field. I am planning to find free time to implement the real skip feature.

onedios commented 5 years ago

Hi thanks for the quick response and update, another scenario when we go back we should skip validation also because it make no sense to validate first (my address tab has 10 fields) and go back so there must be some flag set to skip validation when back trigger fires!

Currently i have to use this code to skip validation in each Step Processes

if( $request->exists('_trigger') ) { return []; }

ycs77 commented 5 years ago

Fixed from #14

ycs77 commented 5 years ago

There are still questions to welcome to tell me. If no problems, I will release a new version.

onedios commented 5 years ago

I guess final question !

The way we add validation rules can we add error message method also? I haven't checked it yet. If yes then i think we good to go!

ycs77 commented 5 years ago

Added from #15

ycs77 commented 5 years ago

@onedios Friendly reminder: One issue will only discuss one thing. if there are other things that need to open a new issue. This will not be confusing!

ycs77 commented 5 years ago

If there are no problems, I prepared to release a new version! Thank you for all your questions!

ycs77 commented 5 years ago

Release v2.0.2 If you have questions, you can open a new issue. Thank you used Laravel Wizard! 😄