public function vanityredirect($name) { $Vanityurl = Vanityurl::Where('vanityurl', '=', $name)->first(); if (!empty($Vanityurl)) { // echo "<pre>";print_r($Vanityurl);echo "</pre>";die(); return Redirect::to($Vanityurl->redirecturl); } else { return Redirect::to('404'); } }
public function deletevanityurl() { die; $id = Input::get('vanityId'); $deleteVanityurl = Vanityurl::where('id', '=', $id)->delete(); echo "Vanity id " . $id . " deleted"; }