public function compose(View $view) { parent::compose($view); $user_org = ''; if (Auth::check()) { try { $user_org = Organization::where('id', '=', Auth::user()->organization_id)->first(); } catch (\Exception $e) { // leave empty } } if ($now = Input::get('time')) { $now = new Carbon($now); } else { $now = Carbon::now(); } $view_data = ['userOrganization' => $user_org, 'config' => \NpmWeb\ServiceOpportunities\Models\Config::singleton(), 'now' => $now]; $view->with($view_data); }