public static function delete($id) { $agama = Agama::find($id); if (!is_null($agama->first())) { return $agama->delete(); } else { return false; } }
public function delete($id) { $ag = Agama::find($id); if ($ag) { $ag->delete(); return Redirect::to('/dash/setting/agama'); } else { Session::flash('message', "Error, Agama with {$id} not found!"); return Redirect::to('/dash/setting/agama'); } }