trans('texts.calendar'), 'account' => auth()->user()->account, ]; return view('calendar', $data); } public function loadEvents() { if (auth()->user()->account->hasFeature(FEATURE_REPORTS)) { $events = dispatch_now(new GenerateCalendarEvents()); } else { $events = []; } return response()->json($events); } }