diff --git a/eloquent-resources.md b/eloquent-resources.md index 8a70d244e..76965a12d 100644 --- a/eloquent-resources.md +++ b/eloquent-resources.md @@ -21,7 +21,7 @@ When building an API, you may need a transformation layer that sits between your To generate a resource class, you may use the `make:resource` Artisan command. By default, resources will be placed in the `app/Http/Resources` directory of your application. Resources extend the `Illuminate\Http\Resources\Json\JsonResource` class: - php artisan make:resource UserResource + php artisan make:resource User #### Resource Collections @@ -38,7 +38,7 @@ To create a resource collection, you should use the `--collection` flag when cre > {tip} This is a high-level overview of resources and resource collections. You are highly encouraged to read the other sections of this documentation to gain a deeper understanding of the customization and power offered to you by resources. -Before diving into all of the options available to you when writing resources, let's first take a high-level look at how resources are used within Laravel. A resource class represents a single model that needs to be transformed into a JSON structure. For example, here is a simple `UserResource` class: +Before diving into all of the options available to you when writing resources, let's first take a high-level look at how resources are used within Laravel. A resource class represents a single model that needs to be transformed into a JSON structure. For example, here is a simple `User` resource class: