public function destroy(Deal $deal) { if (is_integer($deal)) { $deal = Deal::find($deal); } $deal->delete(); Flash::success('Deal has been created Deleted!'); return Redirect::back(); }
public function destroy($deal) { $deal = Deal::find($deal); $deal->delete(); return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']); }