Skip to content

Commit

Permalink
Merge pull request #2 from sajadsdi/fix/errors_type
Browse files Browse the repository at this point in the history
set object type for empty errors
  • Loading branch information
sajadsdi authored Feb 7, 2024
2 parents 579a372 + a7b1b01 commit c99a32b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.1] - 2024-1-25
## [1.0.2] - 2024-02-07

### Added

- No Added

### Changed

- Set errors default type to object

### Fixed

- No Fixed.

## [1.0.1] - 2024-01-25

### Added

Expand Down
2 changes: 1 addition & 1 deletion src/Concerns/RestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function response(mixed $data = [], string $message = 'Success!', array $
return response([
'data' => $data,
'message' => $message,
'errors' => $errors,
'errors' => (object)$errors,
'status' => $status,
'version' => $this->getVersion()
], $status);
Expand Down

0 comments on commit c99a32b

Please sign in to comment.