dimanche 10 septembre 2017

Laravel 5.5 Model to access Cookie

We have a table that has columns: name and cn_name, i hoped to set the name column by the cn_name in fetching values from this model if the locale is set to cn.

if i call the app()->getLocale() in the view it gives the correct value but when I called it in my model it gives the fallback value which is en.

I even tried the $_COOKIE['locale'] but still the value is still the same.

Can anyone tell me why my model can't get the correct value?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire