Support the ongoing development of Laravel.io →
Input Database Forms
Last updated 2 years ago.
0

You should be fine if you change the name of the text form field to "exercise_id" instead of 'exercise_id[][exercise_id]'.

Last updated 2 years ago.
0

Hey Elena, thanks for getting back to me!

Yea it does work, but only for my pregenerated input field. How can I do so that my dynamic fields are also saved to the database?

Thanks!

Last updated 2 years ago.
0

The general idea is $workout->update(Input::all()) (http://laravel.com/docs/4.2/queries#updates) , but you'd need to apply some security checks to that.

If you already have the dynamically generated fields (from a pre-defined set, I guess) on the table then you should just set the $fillable property on your model, but if the fields are truly dynamic, added in a separate table, then you should probably implement your own logic.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Reached reached Joined 27 Feb 2014

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.