php - How to Create Dynamic (Custom Fields Supported) SaaS Apps?
I want to build a multitenant SaaS application in PHP with Laravel 5.4. I have prepared for almost every module that is required for architecture but now I am struck with Automated Custom Fields Generation.
Like we customize forms in SAP, Oracle eBiz Suit, Sage CRM, Salesforce etc. I want to create a schema like this. So if any user/company requires a custom field or field-set, I don't have to re-write the code. The fields should be added like drag-and-drop feature.
I don't know if this technology has a specific term... But I require some guidance and tutorials on architecture of this module.
Thanks for your help!
Answer
Solution:
You can do it by modifying the database.
Let's assume your original database structure is like this.
Then, you modify the database by adding two tables, one for creating the structure of the custom field, the other for adding the value of the corresponding transaction data.
After that, the image below can be achieved by take into account the relationship between the field of the table. I put the same color for the fields that related to each other.
The rest, I assume you already know how to do it in Laravel.
Answer
Solution:
If you would like to have Laravel drag-and-drop, custom form generator similar to a CRM, wufoo, surveymonkey, google forms, formstack, etc... then I recommend: