Support the ongoing development of →
Requests IOC Forms
Last updated 2 years ago.

My approach will be to have a class called ViewFormModel which will hold all the properties the form will display. When the form is filled, u simply update the fields in the class, serialize and save the data to session. When you ready to save it to the database, you init your DB model from the ViewFormModel and save to DB.

Reason I am using ViewFormModel is to keep the size of data small. We don't want to save an entire Eloquent model in session when we not sure we need it until after confirmation.


Sign in to participate in this thread!


Your banner here too?

mseymour mseymour Joined 25 Feb 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.