Enumeration
class RoleListKeyEnum {
const Role_List_Page_Title = 1;
}
My code is below
$Translation_Dictionary->where('KeyID', KeyEnum::Role_List_Page_Title)->first()
Above Code works perfectly on localhost and gives a record.
same code does not work on server but surprisingly work if I write below code.
$Translation_Dictionary->where('KeyID', strval(KeyEnum::Role_List_Page_Title))->first()
KeyID is integer in database
Can somebody tell why do I need to convert it into String to get the results on server?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire