为什么我不能在laravel中发布软件包

时间:2020-05-08 22:01:10

标签: laravel

当我使用php artisan vendor:publish此代码时,请问我是否选择了要发布的软件包,当我键入软件包编号(如10)并按Enter时,我遇到此错误

E:\laravel\okdd>11
'11' is not recognized as an internal or external command,
operable program or batch file.

这是我输入php artisan vendor:publish时的“我的包裹”列表

E:\laravel\okdd>php artisan vendor:publish

 Which provider or tag's files would you like to publish?:
  [0 ] Publish files from all providers and tags listed below
  [1 ] Provider: Anhskohbo\NoCaptcha\NoCaptchaServiceProvider
  [2 ] Provider: Cviebrock\EloquentSluggable\ServiceProvider
  [3 ] Provider: Facade\Ignition\IgnitionServiceProvider
  [4 ] Provider: Fideloper\Proxy\TrustedProxyServiceProvider
  [5 ] Provider: Fruitcake\Cors\CorsServiceProvider
  [6 ] Provider: Illuminate\Foundation\Providers\FoundationServiceProvider
  [7 ] Provider: Illuminate\Mail\MailServiceProvider
  [8 ] Provider: Illuminate\Notifications\NotificationServiceProvider
  [9 ] Provider: Illuminate\Pagination\PaginationServiceProvider
  [10] Provider: Laravel\Tinker\TinkerServiceProvider
  [11] Provider: Shetabit\Payment\Provider\PaymentServiceProvider
  [12] Provider: anlutro\LaravelSettings\ServiceProvider
  [13] Tag: config
  [14] Tag: cors
  [15] Tag: flare-config
  [16] Tag: ignition-config
  [17] Tag: laravel-errors
  [18] Tag: laravel-mail
  [19] Tag: laravel-notifications
  [20] Tag: laravel-pagination
  [21] Tag: migrations
  [22] Tag: views
 >

  Aborted.  

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,我发现你可以输入:

php artisan vendor:publish --provider="Shetabit\Payment\Provider\PaymentServiceProvider"

所以你只需要写你想在里面发布的提供者名称/路径

--provider="Here"

很遗憾,我找不到发生此错误的原因。