Laravel 5.5 - 供应商发布不生成Laracast / Flash包的视图文件?

时间:2018-02-01 15:27:32

标签: php flash laravel-5.5

我刚刚安装了Laravel 5.5并加入了laracast/flash包 - https://github.com/laracasts/flash

composer require laracasts/flash

我的composer.json文件如下所示:

{
   "name": "laravel/laravel",
   "description": "The Laravel Framework.",
   "keywords": ["framework", "laravel"],
   "license": "MIT",
   "type": "project",
   "require": {
       "php": ">=7.0.0",
       "fideloper/proxy": "~3.3",
       "laracasts/flash": "^3.0",
       "laravel/framework": "5.5.*",
       "laravel/tinker": "~1.0",
   },
   "require-dev": {
      "filp/whoops": "~2.0",
      "fzaninotto/faker": "~1.4",
      "mockery/mockery": "~1.0",
      "phpunit/phpunit": "~6.0",
      "symfony/thanks": "^1.0"
   },
   "autoload": {
       "classmap": [
          "database/seeds",
          "database/factories"
       ],
       "psr-4": {
           "App\\": "app/"
       }
   },
   "autoload-dev": {
       "psr-4": {
           "Tests\\": "tests/"
       }
   },
   "extra": {
       "laravel": {
           "dont-discover": [
           ],
           "providers": [
              "Laracasts\\Flash\\FlashServiceProvider",
           ],
           "aliases": {
              "Flash": "Laracasts\\Flash\\Flash",
           }

       }
   },
   "scripts": {
       "post-root-package-install": [
           "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
       ],
       "post-create-project-cmd": [
           "@php artisan key:generate"
       ],
       "post-autoload-dump": [
           "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
           "@php artisan package:discover"
       ]
   },
   "config": {
       "preferred-install": "dist",
       "sort-packages": true,
       "optimize-autoloader": true
   }
}

我运行以下命令:

php artisan vendor:publish --provider="Laracasts\Flash\FlashServiceProvider"

在控制台中给出了以下输出:

> C:\wamp\bin\php\php7.0.3\php.exe artisan vendor:publish --provider=\"Laracasts\Flash\FlashServiceProvider\"
Publishing complete.

但是当我查看resources/views/vendor/文件夹时,没有flash文件夹?

1 个答案:

答案 0 :(得分:2)

Fixed by removing the double quotes:

php artisan vendor:publish --provider=Laracasts\Flash\FlashServiceProvider