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(); 



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire