public function profile($id = null) { if (is_null($id) or !is_numeric($id)) { return Redirect::to('404.html'); } else { $guia = Guia::where('id', '=', $id)->firstOrFail(); if (is_object($guia)) { return View::make('guia.profile', array('guia' => $guia)); } else { return Redirect::to('404.html'); } } }