Browse Source

Merge branch 'master' of github.com:mpociot/laravel-apidoc-generator

Marcel Pociot 9 years ago
parent
commit
204eeebce9
3 changed files with 4 additions and 4 deletions
  1. 2 2
      README.md
  2. 1 1
      composer.json
  3. 1 1
      src/Mpociot/ApiDoc/Generators/AbstractGenerator.php

+ 2 - 2
README.md

@@ -2,7 +2,7 @@
 
 Automatically generate your API documentation from your existing Laravel routes. Take a look at the [example documentation](http://marcelpociot.com/whiteboard/).
 
-`php artisan api:gen --routePrefix=settings/api/*`
+`php artisan api:gen --routePrefix="settings/api/*"`
 
 ![image](http://img.shields.io/packagist/v/mpociot/laravel-apidoc-generator.svg?style=flat)
 ![image](http://img.shields.io/packagist/l/mpociot/laravel-apidoc-generator.svg?style=flat)
@@ -31,7 +31,7 @@ Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class,
 To generate your API documentation, use the `api:generate` artisan command.
 
 ```sh
-$ php artisan api:generate --routePrefix=api/v1/*
+$ php artisan api:generate --routePrefix="api/v1/*"
 ```
 
 This command will scan your applications routes for the URIs matching `api/v1/*` and will parse these controller methods and form requests.

+ 1 - 1
composer.json

@@ -23,7 +23,7 @@
     },
     "require-dev": {
         "orchestra/testbench": "~3.0",
-        "phpunit/phpunit": "~4.0"
+        "phpunit/phpunit": "~4.0 || ~5.0"
     },
     "autoload": {
         "psr-0": {

+ 1 - 1
src/Mpociot/ApiDoc/Generators/AbstractGenerator.php

@@ -369,7 +369,7 @@ abstract class AbstractGenerator
         foreach ($headers as $name => $value) {
             $name = strtr(strtoupper($name), '-', '_');
 
-            if (! starts_with($name, $prefix) && $name !== 'CONTENT_TYPE') {
+            if (! Str::startsWith($name, $prefix) && $name !== 'CONTENT_TYPE') {
                 $name = $prefix.$name;
             }