diff --git a/src/Http/Response/RestResponse.php b/src/Http/Response/RestResponse.php index 6c8c488..9cdd61e 100644 --- a/src/Http/Response/RestResponse.php +++ b/src/Http/Response/RestResponse.php @@ -82,7 +82,9 @@ public function __construct( $result['message'] = $message; } - $result['data'] = $data; + if($data){ + $result['data'] = $data; + } if (!empty($extras)) { $result = array_merge($result, $extras);