I'm building a two step order system, without a 'shopping cart' functionality in Laravel.
The first part (Step 1) of the order form includes file uploads and settings for each file uploaded. The next part is a review of what was uploaded and which settings were selected, after which the user can submit his order, and it is also possible for him to return to the previous form and add files or update his settings.
However, the first part is accessible to anyone, whereas the second part is limited to registered users.
I know there will be people that do not submit their order, and just upload their files in Step 1, which leaves unneeded model objects and files lying around in the database and the uploads directory.
I have identified two ways to solve this problem (which is where my dilemma lies):
I decided to implement the first option. To keep things simple, I serialize the models needed for Step 2 in Step 1 (without saving them to the DB) and unserialize them in the second part. Since I'm using Laravel's ORM relationships though, and because no models are stored before Step 2, I can't retrieve the IDs needed to setup the relationships. So I should either figure out a way to 'connect' the objects need with a custom solution, or go for the second option.
Do you think the second option is acceptable, and is there anything I can do to solve the problem with the first one?