运行后,composer require laravel/scout
在config / app.php配置文件中添加了这个:
Laravel\Scout\ScoutServiceProvider::class,
最后
php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
问题是它没有在配置文件夹中发布scout.php文件......
答案 0 :(得分:3)
好的,要看到你做错了什么,只需使用php artisan vendor:publish,不带任何参数。
它将发布所有可用的提供。如果它不起作用,应该有一个包的问题,考虑重新安装它。
答案 1 :(得分:0)
我有同样的问题,但使用流明,在我的情况下输出是这样的:
Problem 1
- Conclusion: don't install laravel/scout v3.0.7
- Conclusion: don't install laravel/scout v3.0.6
- Conclusion: don't install laravel/scout v3.0.5
- Conclusion: don't install laravel/scout v3.0.4
- Conclusion: don't install laravel/scout v3.0.3
- Conclusion: don't install laravel/scout v3.0.2
- Conclusion: don't install laravel/scout v3.0.1
- Conclusion: don't install laravel/scout v3.0.0
- Conclusion: don't install laravel/scout 3.0.x-dev
- Conclusion: remove illuminate/bus v5.3.23
- Installation request for laravel/scout ^3.0 -> satisfiable by laravel/scout[3.0.x-dev, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7].
- Conclusion: don't install illuminate/bus v5.3.23
- laravel/scout 3.0.x-dev requires illuminate/bus ~5.4 -> satisfiable by illuminate/bus[5.4.x-dev, 5.5.x-dev, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.9].
- Can only install one of: illuminate/bus[5.4.x-dev, v5.3.23].
- Can only install one of: illuminate/bus[5.5.x-dev, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.0, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.13, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.17, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.19, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.27, v5.3.23].
- Can only install one of: illuminate/bus[v5.4.9, v5.3.23].
- Installation request for illuminate/bus (locked at v5.3.23) -> satisfiable by illuminate/bus[v5.3.23].
Scout适用于版本 5.4 ,因此在文件 composer.json 中更改以下行中的版本:
"laravel/lumen-framework": "5.4.*"
在此之后运行:
composer dump-autoload
composer update
composer require laravel/scout
并完成:
php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
这就是Lumen的情况,但如果不是你的情况,请尝试在composer文件上更新Laravel版本,然后在安装scout之前更新。
我希望这会有所帮助。
答案 2 :(得分:0)
您只需手动复制并创建配置文件:
自: /vendor/laravel/scout/config/scout.php
于: /config/scout.php
答案 3 :(得分:0)
如果您使用artisan config:cache
缓存了配置,则会发生这种情况。要解决此问题,请清除配置缓存(再次运行artisan config:cache
)。然后重试vendor publish命令。