/** * Redirect to the URL * @param string $code URL hash * @return [type] [description] */ public function redirect($code) { $link = Links::whereCode($code)->first(); header("Location:" . $link->url); }