lundi 11 septembre 2017

Laravel 5 Set timezone base on user settings

I have a user table that have a timezone column.

I want to set all of the controller function timezone based on the user setting. So when he logged in, all of the,

Ex. Chatmessage::where(....)->get();

The created_at * edited_at will be changed. I only want on GET to be changed. Not the POST.

I've tried Config::set('app.timezone', Auth::user()->timezone); it's not working, it still used the Laravel app/config.php



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire