How to prevent "Trying to get property of non-object" from an empty field. I have $employee->genderRelation->name;
but gender field in my Employee table is empty or not set yet. how to return it into an empty string instead of returning error?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire