Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getEvents($day)
- {
- return Event::with('user','gym')->select('id','title','start','user_id','gym_id')->get()
- ->groupBy(function($day) {
- setlocale(LC_TIME, 'pl');
- return Date::parse($day->start)->format('l');
- })->where('start','=',$day);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement