diff --git a/src/Commands/stubs/resource.stub b/src/Commands/stubs/resource.stub index c67afeea9..6a1f18390 100644 --- a/src/Commands/stubs/resource.stub +++ b/src/Commands/stubs/resource.stub @@ -2,9 +2,9 @@ namespace $NAMESPACE$; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class $CLASS$ extends Resource +class $CLASS$ extends JsonResource { /** * Transform the resource into an array. diff --git a/tests/Commands/__snapshots__/ResourceMakeCommandTest__it_generated_correct_file_with_content__1.php b/tests/Commands/__snapshots__/ResourceMakeCommandTest__it_generated_correct_file_with_content__1.php index 6abb070b9..e2b3765ef 100644 --- a/tests/Commands/__snapshots__/ResourceMakeCommandTest__it_generated_correct_file_with_content__1.php +++ b/tests/Commands/__snapshots__/ResourceMakeCommandTest__it_generated_correct_file_with_content__1.php @@ -2,9 +2,9 @@ namespace Modules\\Blog\\Transformers; -use Illuminate\\Http\\Resources\\Json\\Resource; +use Illuminate\\Http\\Resources\\Json\\JsonResource; -class PostsTransformer extends Resource +class PostsTransformer extends JsonResource { /** * Transform the resource into an array.