Skip to content

Commit 5671af9

Browse files
authored
Make resource stub return type compatible with parent method (#38487)
* stub resource return compatible with parent method * stub resource-collection return compatible with parent method
1 parent adf93f8 commit 5671af9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Illuminate/Foundation/Console/stubs/resource-collection.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class {{ class }} extends ResourceCollection
1010
* Transform the resource collection into an array.
1111
*
1212
* @param \Illuminate\Http\Request $request
13-
* @return array
13+
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
1414
*/
1515
public function toArray($request)
1616
{

src/Illuminate/Foundation/Console/stubs/resource.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class {{ class }} extends JsonResource
1010
* Transform the resource into an array.
1111
*
1212
* @param \Illuminate\Http\Request $request
13-
* @return array
13+
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
1414
*/
1515
public function toArray($request)
1616
{

0 commit comments

Comments
 (0)