فهرست منبع

Document fractal dependency (closes #374)

shalvah 6 سال پیش
والد
کامیت
af1440a5b5
2فایلهای تغییر یافته به همراه12 افزوده شده و 1 حذف شده
  1. 7 0
      README.md
  2. 5 1
      composer.json

+ 7 - 0
README.md

@@ -194,6 +194,7 @@ public function createPost()
 They will be included in the generated documentation text and example requests.
 
 **Result:**
+
 ![](body_params.png)
 
 ### Indicating auth status
@@ -260,6 +261,12 @@ public function showUser(int $id)
 ```
 For the first route above, this package will generate a set of two users then pass it through the transformer. For the last two, it will generate a single user and then pass it through the transformer.
 
+> Note: for transformer support, you need to install the league/fractal package
+
+```bash
+composer require league/fractal
+```
+
 #### Gnerating responses automatically
 If you don't specify an example response using any of the above means, this package will attempt to get a sample response by making a request to the route (a "response call"). A few things to note about response calls:
 - They are done within a database transaction and changes are rolled back afterwards.

+ 5 - 1
composer.json

@@ -28,8 +28,12 @@
         "orchestra/testbench": "3.5.* || 3.6.* || 3.7.*",
         "phpunit/phpunit": "^6.0.0 || ^7.4.0",
         "dingo/api": "2.0.0-alpha1",
-        "mockery/mockery": "^1.2.0"
+        "mockery/mockery": "^1.2.0",
+        "league/fractal": "^0.17.0"
     },
+    "suggest": {
+        "league/fractal": "Required for transformers support"
+    }
     "autoload": {
         "psr-4": {
             "Mpociot\\ApiDoc\\": "src/"