コード例 #1
0
 /**
  * @test update
  */
 public function testUpdatesysAreaAtuacaoManual()
 {
     $sysAreaAtuacaoManual = $this->makesysAreaAtuacaoManual();
     $fakesysAreaAtuacaoManual = $this->fakesysAreaAtuacaoManualData();
     $updatedsysAreaAtuacaoManual = $this->sysAreaAtuacaoManualRepo->update($fakesysAreaAtuacaoManual, $sysAreaAtuacaoManual->id);
     $this->assertModelData($fakesysAreaAtuacaoManual, $updatedsysAreaAtuacaoManual->toArray());
     $dbsysAreaAtuacaoManual = $this->sysAreaAtuacaoManualRepo->find($sysAreaAtuacaoManual->id);
     $this->assertModelData($fakesysAreaAtuacaoManual, $dbsysAreaAtuacaoManual->toArray());
 }
コード例 #2
0
 /**
  * @param int $id
  * @return Response
  *
  * @SWG\Delete(
  *      path="/sysAreaAtuacaoManuals/{id}",
  *      summary="Remove the specified sysAreaAtuacaoManual from storage",
  *      tags={"sysAreaAtuacaoManual"},
  *      description="Delete sysAreaAtuacaoManual",
  *      produces={"application/json"},
  *      @SWG\Parameter(
  *          name="id",
  *          description="id of sysAreaAtuacaoManual",
  *          type="integer",
  *          required=true,
  *          in="path"
  *      ),
  *      @SWG\Response(
  *          response=200,
  *          description="successful operation",
  *          @SWG\Schema(
  *              type="object",
  *              @SWG\Property(
  *                  property="success",
  *                  type="boolean"
  *              ),
  *              @SWG\Property(
  *                  property="data",
  *                  type="string"
  *              ),
  *              @SWG\Property(
  *                  property="message",
  *                  type="string"
  *              )
  *          )
  *      )
  * )
  */
 public function destroy($id)
 {
     /** @var sysAreaAtuacaoManual $sysAreaAtuacaoManual */
     $sysAreaAtuacaoManual = $this->SysAreaAtuacaoManualRepository->find($id);
     if (empty($sysAreaAtuacaoManual)) {
         return Response::json(ResponseUtil::makeError('sysAreaAtuacaoManual not found'), 404);
     }
     $sysAreaAtuacaoManual->delete();
     return $this->sendResponse($id, 'sysAreaAtuacaoManual deleted successfully');
 }