/** * undocumented function * * @return void * @author **/ public function deleteDo() { $id = Input::get('id'); $validator = $this->deleteValid($id); if ($validator) { $donation = Donation::remove($id); if ($donation) { return Redirect::route('admin.donation')->withStatuses(['delete' => 'Hapus Sukses!']); } return Redirect::route('admin.donation')->withErrors(['delete' => 'Hapus Gagal!']); } return Redirect::route('admin.donation')->withErrors(['used' => 'Maaf, data ini masih digunakan! Hapus Gagal.']); }