Skip to content
Closed

V4 #37

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Make your Laravel API [JSON:API](https://jsonapi.org/) compliant with the `Brainstud\JsonApi` package.

Specific V4 Branch!

## Table of contents

- [Installation](#installation)
Expand Down
52 changes: 26 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"name": "brainstud/json-api-resource",
"description": "Build JSON:API compliant Laravel API resources",
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0"
},
"autoload": {
"psr-4": {
"Brainstud\\JsonApi\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Brainstud\\JsonApi\\Tests\\": "tests"
}
},
"scripts": {
"test": "./vendor/bin/phpunit --configuration ./phpunit.xml"
},
"require-dev": {
"phpunit/phpunit": "^9.6.3",
"orchestra/testbench": "^7.22.0",
"laravel/pint": "^1.22.0"
"name": "brainstud/json-api-resource",
"description": "Build JSON:API compliant Laravel API resources",
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0, <12.45.0"
},
"autoload": {
"psr-4": {
"Brainstud\\JsonApi\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Brainstud\\JsonApi\\Tests\\": "tests"
}
},
"scripts": {
"test": "./vendor/bin/phpunit --configuration ./phpunit.xml"
},
"require-dev": {
"phpunit/phpunit": "^9.6.3",
"orchestra/testbench": "^7.22.0",
"laravel/pint": "^1.22.0"
}
}
2 changes: 1 addition & 1 deletion src/Resources/JsonApiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function getType(): string
* Default to either `registerData['attributes']` or an empty array.
* Should be overwritten to create custom attributes.
*/
public function toAttributes(Request $request): array
protected function toAttributes(Request $request): array
{
return $this->registerData['attributes'] ?? [];
}
Expand Down
Loading