Skip to content

Commit

Permalink
Make resource stub return type compatible with parent method (laravel…
Browse files Browse the repository at this point in the history
…#38487)

* stub resource return compatible with parent method

* stub resource-collection return compatible with parent method
  • Loading branch information
vanthao03596 authored and victorvilella committed Oct 12, 2021
1 parent c4f131e commit f63de7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class {{ class }} extends ResourceCollection
* Transform the resource collection into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/stubs/resource.stub
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class {{ class }} extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
Expand Down

0 comments on commit f63de7f

Please sign in to comment.