Check if table content exist or not

Hi,

how can I check, if a set of data already exist in table? The insert with save() function is working.

Is there an example, I don't find anything.

Rgds

Stefan



6.0k

You can add validation to your model that checks for unique-ness.

See the model reference docs detailing the validations, pay attention to the uniqueness validator detailed in the code example.