Browse Source

Fix issue #114 (#123)

Adding indentation to js example request
Idir Ouhab Meskine 8 years ago
parent
commit
c2388cba27
2 changed files with 9 additions and 9 deletions
  1. 3 3
      src/resources/views/partials/route.blade.php
  2. 6 6
      tests/Fixtures/index.md

+ 3 - 3
src/resources/views/partials/route.blade.php

@@ -28,13 +28,13 @@ var settings = {
     @if(count($parsedRoute['parameters']))
 "data": {!! str_replace('    ','        ',json_encode(array_combine(array_keys($parsedRoute['parameters']), array_map(function($param){ return $param['value']; },$parsedRoute['parameters'])), JSON_PRETTY_PRINT)) !!},
     @endif
-    "headers": {
-    "accept": "application/json"
+"headers": {
+        "accept": "application/json"
     }
 }
 
 $.ajax(settings).done(function (response) {
-console.log(response);
+    console.log(response);
 });
 ```
 

+ 6 - 6
tests/Fixtures/index.md

@@ -40,13 +40,13 @@ var settings = {
     "crossDomain": true,
     "url": "http://localhost/api/test",
     "method": "GET",
-        "headers": {
-    "accept": "application/json"
+    "headers": {
+        "accept": "application/json"
     }
 }
 
 $.ajax(settings).done(function (response) {
-console.log(response);
+    console.log(response);
 });
 ```
 
@@ -79,13 +79,13 @@ var settings = {
     "crossDomain": true,
     "url": "http://localhost/api/fetch",
     "method": "GET",
-        "headers": {
-    "accept": "application/json"
+    "headers": {
+        "accept": "application/json"
     }
 }
 
 $.ajax(settings).done(function (response) {
-console.log(response);
+    console.log(response);
 });
 ```