diff --git a/src/Generator.php b/src/Generator.php
index <HASH>..<HASH> 100644
--- a/src/Generator.php
+++ b/src/Generator.php
@@ -18,7 +18,7 @@ class Generator
             }
             File::makeDirectory($docDir);
             $excludeDirs = config('l5-swagger.paths.excludes');
-            $swagger = \Swagger\scan($appDir, $excludeDirs);
+            $swagger = \Swagger\scan($appDir, ['exclude' => $excludeDirs]);
 
             $filename = $docDir.'/api-docs.json';
             $swagger->saveAs($filename);
Fixes excluded directories

Excluded directories were not being correctly passed to the $options of Swagger\scan()