/** * @api {delete} /Servers/{id} 删除指定的 server * @apiGroup Servers * @apiVersion 0.0.1 * @apiParam {Number} id Server 的 ID * @apiSuccessExample {json} Success-Response: * HTTP/1.1 200 OK * @apiErrorExample {json} Error-Response: * HTTP/1/1 404 Not Found */ public function destroy($id) { // if (Server::destroy($id)) { return response('OK', 200); } return response('Not Found', 404); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Server::destroy($id); return redirect('servers'); }