Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nogepog's avatar

Saving request from store method in three tables based on condition.

I have a form with 200 fields.Each field has a column in database with the type of field.A field can be of type T/F,number or text. I want to save each field type in a separate table in database based on their type. e.g 44)do you smoke? t/f should be saved in true_false_response table 66)How many boxes per week? number should be saved in numeric_response table.

How do i filter these fields out and save them in three different tables.with a possibility that some fields also may be empty.

code:https://itsolutionstuff.com/post/laravel-58-ajax-crud-tutorial-using-datatable-jsexample.html

0 likes
0 replies

Please or to participate in this conversation.