johnylemon / laravel-apidocs

Laravel API documentation generating tool
MIT License
47 stars 3 forks source link

Can't use artisan command to create new class #4

Open jimtaylor123 opened 3 years ago

jimtaylor123 commented 3 years ago

When running php artisan command php artisan apidocs:endpoint SampleEndpoint I get the following error:

Call to undefined function Johnylemon\Apidocs\Console\Commands\stub()

  at vendor/johnylemon/laravel-apidocs/src/Console/Commands/Make.php:46
     42▕         // target path
     43▕         //
     44▕         $path = app_path("$dir/$class.php");
     45▕ 
  ➜  46▕         stub($this->stub(), $path, [
     47▕             'NAMESPACE' => $this->namespace($dir),
     48▕             'NAME' => $class,
     49▕         ]);
     50▕     }

      +13 vendor frames 
  14  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()
domainoverflow commented 3 years ago

at vendor/johnylemon/laravel-apidocs/src/Console/Commands/Make.php at line 46 replace stub to $this->stub