1 year ago

My first Big App - Controller Issue

Posted 1 year ago by tha07

Hi, I'm new to Laravel and loving it. I'm on my way to create my first big app for a laboratory. I'm in the plan stage and have this issue.

I have planned several tables. customers, tests, customer_tests, test_properties, customer_test_property_results

Example for a test is "high blood pressure". Each test have several properties like white blood cell count, red blood cell count with there necessary max values and min values. this properties vary according to the test.

After customer register for a test and the test is done by the lab, the test results are entered by the app. I will create this form with every test property to enter there respected values.

The problem is How can I validate the form data? The form values are varying with each test types. So the controller function which test data results are validating don't know what test is coming to do the validations. Is there any dynamic way to do this?

Please sign in or create an account to participate in this conversation.