diff --git a/src/Illuminate/Http/Resources/Json/Resource.php b/src/Illuminate/Http/Resources/Json/JsonResource.php similarity index 98% rename from src/Illuminate/Http/Resources/Json/Resource.php rename to src/Illuminate/Http/Resources/Json/JsonResource.php index 685f56977949..98272d929a55 100644 --- a/src/Illuminate/Http/Resources/Json/Resource.php +++ b/src/Illuminate/Http/Resources/Json/JsonResource.php @@ -12,7 +12,7 @@ use Illuminate\Http\Resources\DelegatesToResource; use Illuminate\Http\Resources\ConditionallyLoadsAttributes; -class Resource implements ArrayAccess, JsonSerializable, Responsable, UrlRoutable +class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRoutable { use ConditionallyLoadsAttributes, DelegatesToResource; diff --git a/src/Illuminate/Http/Resources/Json/ResourceCollection.php b/src/Illuminate/Http/Resources/Json/ResourceCollection.php index 2858244e3c57..d7a917000a0e 100644 --- a/src/Illuminate/Http/Resources/Json/ResourceCollection.php +++ b/src/Illuminate/Http/Resources/Json/ResourceCollection.php @@ -6,7 +6,7 @@ use Illuminate\Pagination\AbstractPaginator; use Illuminate\Http\Resources\CollectsResources; -class ResourceCollection extends Resource implements IteratorAggregate +class ResourceCollection extends JsonResource implements IteratorAggregate { use CollectsResources; diff --git a/tests/Integration/Http/Fixtures/AuthorResource.php b/tests/Integration/Http/Fixtures/AuthorResource.php index 1777cec784e6..76e2e7a55c7d 100644 --- a/tests/Integration/Http/Fixtures/AuthorResource.php +++ b/tests/Integration/Http/Fixtures/AuthorResource.php @@ -2,9 +2,9 @@ namespace Illuminate\Tests\Integration\Http\Fixtures; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class AuthorResource extends Resource +class AuthorResource extends JsonResource { public function toArray($request) { diff --git a/tests/Integration/Http/Fixtures/PostResource.php b/tests/Integration/Http/Fixtures/PostResource.php index d15f9c7dff01..0a5a8f725905 100644 --- a/tests/Integration/Http/Fixtures/PostResource.php +++ b/tests/Integration/Http/Fixtures/PostResource.php @@ -2,9 +2,9 @@ namespace Illuminate\Tests\Integration\Http\Fixtures; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class PostResource extends Resource +class PostResource extends JsonResource { public function toArray($request) { diff --git a/tests/Integration/Http/Fixtures/PostResourceWithOptionalData.php b/tests/Integration/Http/Fixtures/PostResourceWithOptionalData.php index 182a808d5e96..86bb515a18af 100644 --- a/tests/Integration/Http/Fixtures/PostResourceWithOptionalData.php +++ b/tests/Integration/Http/Fixtures/PostResourceWithOptionalData.php @@ -2,9 +2,9 @@ namespace Illuminate\Tests\Integration\Http\Fixtures; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class PostResourceWithOptionalData extends Resource +class PostResourceWithOptionalData extends JsonResource { public function toArray($request) { diff --git a/tests/Integration/Http/Fixtures/PostResourceWithOptionalMerging.php b/tests/Integration/Http/Fixtures/PostResourceWithOptionalMerging.php index 30bb7c49a56e..88a0c8b372a6 100644 --- a/tests/Integration/Http/Fixtures/PostResourceWithOptionalMerging.php +++ b/tests/Integration/Http/Fixtures/PostResourceWithOptionalMerging.php @@ -2,9 +2,9 @@ namespace Illuminate\Tests\Integration\Http\Fixtures; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class PostResourceWithOptionalMerging extends Resource +class PostResourceWithOptionalMerging extends JsonResource { public function toArray($request) { diff --git a/tests/Integration/Http/Fixtures/ReallyEmptyPostResource.php b/tests/Integration/Http/Fixtures/ReallyEmptyPostResource.php index 4cc319ecc4d9..5e59a75fb077 100644 --- a/tests/Integration/Http/Fixtures/ReallyEmptyPostResource.php +++ b/tests/Integration/Http/Fixtures/ReallyEmptyPostResource.php @@ -2,9 +2,9 @@ namespace Illuminate\Tests\Integration\Http\Fixtures; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class ReallyEmptyPostResource extends Resource +class ReallyEmptyPostResource extends JsonResource { // } diff --git a/tests/Integration/Http/Fixtures/SerializablePostResource.php b/tests/Integration/Http/Fixtures/SerializablePostResource.php index 02645f6403bf..9c3aa628a96e 100644 --- a/tests/Integration/Http/Fixtures/SerializablePostResource.php +++ b/tests/Integration/Http/Fixtures/SerializablePostResource.php @@ -2,9 +2,9 @@ namespace Illuminate\Tests\Integration\Http\Fixtures; -use Illuminate\Http\Resources\Json\Resource; +use Illuminate\Http\Resources\Json\JsonResource; -class SerializablePostResource extends Resource +class SerializablePostResource extends JsonResource { public function toArray($request) {