The error occurs because you're trying to set the value of a hidden input field to an array directly, but HTML input fields can only hold string values. Since $DiseaseDiagnosed is an array, it cannot be directly assigned as a value in the input field.
Use implode() to Convert the Array to a String blade Copy Edit This will convert the array into a comma-separated string, making it valid for the input field.