mercredi 22 août 2018

Laravel how to check if value exists in Form::select before assigning it?

I have a predefined Form::select with multiple values.

My problem is that users can import data that doesn't exist in my predefined list. So what I'm looking for here is to either check first if the value exists in the list and if it doesn't change it to a different value (Is it possible to check the list directly or do I have to create another array again to use for checking),

OR if it's possible when assigning the value in Form::select and it doesn't exist in the list assign another value to it.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire