/**
  * 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.']);
 }
Esempio n. 2
0
 /**
  * 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');
     }
 }
Esempio n. 3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Customer::destroy($id);
     return redirect()->back();
 }
Esempio n. 4
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Customer::destroy($id);
 }
Esempio n. 5
0
 /**
  * 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!');
 }