mercredi 18 janvier 2017

Laravel model output customize

I have a column named "name" in my database table hold JSON value like that:

{"en":"Morocco","ar":"المغرب"}

I want to access this value automatically depending on the current language by just writing: $country->name on my view, Thanks.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2jxWWx4
via IFTTT

Aucun commentaire:

Enregistrer un commentaire