Error : Call to undefined method phpDocumentor\Reflection\Project::where()

Error : Call to undefined method phpDocumentor\Reflection\Project::where()

为 "Build a laravel App with TDD" 做 Larcast 教程,当我添加 $response->assertRedirect(Project::where($attributes)->first()->path());

我开始得到以下信息:

Error : Call to undefined method phpDocumentor\Reflection\Project::where()

我如何解决这个问题,在其他地方努力寻找解决方案,我已将其添加到 laracast 教程本身但没有答案。

尝试在 laracasts 网站上寻找答案。

我的测试应该通过了。 (该功能确实有效,但我希望进行适当的测试以证明它确实有效)

您对 Project 使用了错误的导入,所以在测试 class 之上放这个:

use App\Project;