瀏覽代碼

Set a default routematcher when fetching from config

Guy Marriott 5 年之前
父節點
當前提交
4c97a33398
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/ApiDocGeneratorServiceProvider.php

+ 2 - 1
src/ApiDocGeneratorServiceProvider.php

@@ -5,6 +5,7 @@ namespace Mpociot\ApiDoc;
 use Illuminate\Support\ServiceProvider;
 use Illuminate\Support\ServiceProvider;
 use Mpociot\ApiDoc\Commands\GenerateDocumentation;
 use Mpociot\ApiDoc\Commands\GenerateDocumentation;
 use Mpociot\ApiDoc\Commands\RebuildDocumentation;
 use Mpociot\ApiDoc\Commands\RebuildDocumentation;
+use Mpociot\ApiDoc\Matching\RouteMatcher;
 use Mpociot\ApiDoc\Matching\RouteMatcherInterface;
 use Mpociot\ApiDoc\Matching\RouteMatcherInterface;
 
 
 class ApiDocGeneratorServiceProvider extends ServiceProvider
 class ApiDocGeneratorServiceProvider extends ServiceProvider
@@ -38,7 +39,7 @@ class ApiDocGeneratorServiceProvider extends ServiceProvider
         }
         }
 
 
         // Bind the route matcher implementation
         // Bind the route matcher implementation
-        $this->app->bind(RouteMatcherInterface::class, $this->app['config']['apidoc']['routeMatcher']);
+        $this->app->bind(RouteMatcherInterface::class, config('apidoc.routeMatcher', RouteMatcher::class));
     }
     }
 
 
     /**
     /**