Skip to content

Commit ea1ea07

Browse files
committed
formatting
1 parent be536df commit ea1ea07

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/Illuminate/Foundation/Console/ResourceMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ protected function getOptions()
102102
{
103103
return [
104104
['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the resource already exists'],
105-
['collection', 'c', InputOption::VALUE_NONE, 'Create a resource collection'],
106105
['json-api', 'j', InputOption::VALUE_NONE, 'Create a JSON:API resource'],
106+
['collection', 'c', InputOption::VALUE_NONE, 'Create a resource collection'],
107107
];
108108
}
109109
}

src/Illuminate/Foundation/Console/stubs/resource-json-api.stub

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ use Illuminate\Http\Resources\JsonApi\JsonApiResource;
88
class {{ class }} extends JsonApiResource
99
{
1010
/**
11-
* Transform the resource into an array.
12-
*
13-
* @return list<string>|array<string, mixed>
11+
* The resource's attributes.
1412
*/
15-
public function toAttributes(Request $request): array
16-
{
17-
return parent::toAttributes($request);
18-
}
13+
public $attributes = [
14+
// ...
15+
];
16+
17+
/**
18+
* The resource's relationships.
19+
*/
20+
public $relationships = [
21+
// ...
22+
];
1923
}

0 commit comments

Comments
 (0)