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