src/Http/Responds.php
public function respondWithSuccess(array $data = []): JsonResponse
    {
        return $this->setStatusCode(IlluminateResponse::HTTP_OK)->respond([
            'status' => [
                'http_code' => $this->getStatusCode(),
            ],
            'data' => $data,
        ]);
    }
public function respondWithSuccess(array $data = []): JsonResponse
    {
        return $this->setStatusCode(IlluminateResponse::HTTP_OK)->respond([
            'status' => [
                'http_code' => $this->getStatusCode(),
            ],
            'data' => $data,
        ]);
    }
public function respondWithSuccess ( array $ data = [ ] ) : JsonResponse { return $ this -> setStatusCode ( IlluminateResponse :: HTTP_OK ) -> respond ( [ 'status' => [ 'http_code' => $ this -> getStatusCode ( ) , ] , 'data' => $ data , ] ) ; }
Returns 200 response with data.

@param array $data

@return \Illuminate\Http\JsonResponse
Returns 200 response with data .