middleware('auth'); } public function home() { switch (Auth::user()->role()) { case 'Customer': return View('home'); case 'Reseller': break; case 'Wholesaler': break; default: abort(500,'Unknown role: ',Auth::user()->role()); } } /** * Helper to redirect to the old site, when functions are not available in this one. * * @param $type * @param $action * @param $id * @return void * @deprecated @todo Remove once all functions added */ public function oldsite($type,$action,$id) { abort(307,sprintf('http://www.graytech.net.au/u/%s/%s/%s',$type,$action,$id)); } }