/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $data = categories::find($id); if ($data) { $data->delete(); return redirect()->route('parent_gift/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_SUCCESS', ['message' => 'The selected gift item is delete'])); } else { return redirect()->route('parent_gift/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_WARNING', ['message' => 'Whoops, looks like something went wrong . '])); } }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function DeleteAction($id) { $this->category = categories::find($id); if ($this->category) { $this->category->delete(); return redirect()->route('category/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_SUCCESS', ['message' => 'The selected category item delete'])); } return redirect()->route('category/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_ALERT', ['message' => 'Whoops, looks like something went wrong.'])); }