/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $result = Customer::destroy($id); return redirect()->route('customers.index')->with(['message' => $result ? 'Customer deleted!' : 'Something went wrong, please try again.']); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { try { Customer::destroy($id); return Redirect::route('show_customers'); } catch (ModelNotFoundException $e) { return Redirect::route('show_customers'); } }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Customer::destroy($id); return redirect()->back(); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Customer::destroy($id); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { Customer::destroy($id); return redirect('customer')->with('message', 'Data berhasil dihapus!'); }