public function loadEvent($id) { $squeeb = Eventsq::where('id', '=', $id)->first(); View::share('squeeb', $squeeb); view::share('model', 'Event'); //detect device $detect = new Mobile_Detect(); $deviceType = $detect->isMobile() ? $detect->isTablet() ? 'tablet' : 'phone' : 'computer'; View::share('deviceType', $deviceType); //update the squeeb table $this->sqFactor($squeeb); if (Auth::user()) { return View::make('member.squeeb'); } return View::make('guest.squeeb'); }