找不到类“Laravel\Dusk\DuskServiceProvider”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/49731272/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 17:37:06  来源:igfitidea点击:

Class 'Laravel\Dusk\DuskServiceProvider' not found

phplaravelcomposer-phplaravel-dusk

提问by Abdul Qadir

I updated composer using

我更新了作曲家使用

composer update

composer update

having error

有错误

enter image description here

在此处输入图片说明

To resolve this i tried to do composer require --dev laravel/dusk

为了解决这个问题,我试图做 composer require --dev laravel/dusk

This is throwing

这是扔

enter image description here

在此处输入图片说明

Any thing which i am missing ?

我错过了什么?

Please assist.

请协助。

回答by Hiren Gohel

As you are using Laravel 5.4version you need to install ^2.0of laravel dusk version.

当您使用Laravel 5.4版本时,您需要安装^2.0laravel dusk 版本。

Try this command to install it:

试试这个命令来安装它:

composer require --dev laravel/dusk:^2.0

Then add

然后加

Laravel\Dusk\DuskServiceProvider::class,

in providersarray in config/app.phpfile.

providersconfig/app.php文件中的数组中。

This might be fixed your issue!

这可能会解决您的问题!