简体   繁体   English

php 工匠望远镜:安装不发布 laravel 中的资产

[英]php artisan telescope:install not publishing the assets in laravel

i have a laravel 6 app that i want to install the telescope in that i did all the commands like composer update and composer dump-autoload and then i install the telescope every thing is going fine and when i run php artisan telescope:install i get the message below:我有一个 laravel 6 应用程序,我想安装望远镜,因为我执行了composer updatecomposer dump-autoload等所有命令,然后我安装了望远镜,一切正常,当我运行php artisan telescope:install我得到下面的消息:

Publishing Telescope Service Provider...
Publishing Telescope Assets...
Publishing Telescope Configuration...
Telescope scaffolding installed successfully.

but it wont generate the config file and migration so when i run php artisan migrate i get this message:但它不会生成配置文件和迁移,所以当我运行php artisan migrate时,我收到此消息:

nothing to migrate

thus i cant access the telescope.因此我无法访问望远镜。 please advice.请指教。

For me, the installation was incomplete, so I comment the API provider and cleared the cache.对我来说,安装不完整,所以我评论了 API 提供程序并清除了缓存。 And re-installed.并重新安装。

As given in the article: https://panjeh.medium.com/new-installation-of-laravel-telescope-fails-418afa2b8972如文章中所述: https://panjeh.medium.com/new-installation-of-laravel-telescope-fails-418afa2b8972

"was this new line in the config/app.php file: App\Providers\TelescopeServiceProvider::class, That causes the error and it seems the installation was not complete and only that line was added. So I commented that line in the config/app.php file" “是 config/app.php 文件中的这一新行吗:App\Providers\TelescopeServiceProvider::class,这会导致错误,似乎安装不完整,只添加了该行。所以我在配置中评论了该行/app.php 文件"

You may use Composer to install Telescope into your Laravel project:您可以使用 Composer 将 Telescope 安装到您的 Laravel 项目中:

composer require laravel/telescope

After installing Telescope, publish its assets using the telescope:install Artisan command.安装 Telescope 后,使用 telescope:install Artisan 命令发布其资产。

php artisan telescope:install

After installing Telescope, you should also run the migrate command:安装 Telescope 后,您还应该运行 migrate 命令:

php artisan migrate

This works for me: composer require laravel/telescope --dev Full guide to install and set up Laravel Telescope https://medium.com/@Zerquix18/full-guide-to-install-and-set-up-laravel-telescope-daf558f734f2这对我有用: composer require laravel/telescope --dev安装和设置 Laravel 望远镜的完整指南https://medium.com/@Zerquix18/full-guide-to-install-and-set-up-laravel-telescope -daf558f734f2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM