mercredi 28 septembre 2016

Use retrieved value from internal query to query with Laravel Eloquent

The value I need for the now() query is the timezone from the Group model, I'm just not sure how to get it within the query.

I would like to use $group->timezone value instead of hardcoding the value in now(). Any help would be greatly appreciated.

$reminders = Reminder::with('group','appointment')
             ->where('reminder', '<', Carbon::now('America/New_York'))  --> Use $group->timezone value instead of hardcoding the value
             ->get(); 



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

Aucun commentaire:

Enregistrer un commentaire