无法打开流:权限被拒绝 - Artisan

Failed to open stream: Permission denied - Artisan

两天以来我一直在从事 Laravel 项目,我的迁移从未遇到过任何问题。但是今天早上,当我尝试 php artisan migrate --seed 时,出现以下错误:

[ErrorException]
Include(D:\Programmes\xampp\htdocs\Laman): failed to open stream: Permission denied

所以我尝试了 php artisan cache:clearphp artisan config:clearphp artisan tinker 并得到了完全相同的错误。当我查看我的许可时,一切看起来都很好:

drwxr-xr-x 1 Foo Bar 197121      0 Apr 26 06:48 app/
-rwxr-xr-x 1 Foo Bar 197121   1646 Apr 25 17:21 artisan*
drwxr-xr-x 1 Foo Bar 197121      0 Apr 25 17:21 bootstrap/
-rw-r--r-- 1 Foo Bar 197121   1378 Apr 25 19:54 composer.json
-rw-r--r-- 1 Foo Bar 197121 123397 Apr 25 19:54 composer.lock
drwxr-xr-x 1 Foo Bar 197121      0 Apr 26 06:32 config/
drwxr-xr-x 1 Foo Bar 197121      0 Apr 25 17:21 database/
drwxr-xr-x 1 Foo Bar 197121      0 Apr 25 23:09 node_modules/
-rw-r--r-- 1 Foo Bar 197121   1075 Apr 25 22:52 package.json
-rw-r--r-- 1 Foo Bar 197121   1055 Apr 25 17:21 phpunit.xml
drwxr-xr-x 1 Foo Bar 197121      0 Apr 26 06:24 public/
-rw-r--r-- 1 Foo Bar 197121   3424 Apr 25 17:21 readme.md
drwxr-xr-x 1 Foo Bar 197121      0 Apr 25 17:21 resources/
drwxr-xr-x 1 Foo Bar 197121      0 Apr 26 06:48 routes/
-rw-r--r-- 1 Foo Bar 197121    563 Apr 25 17:21 server.php
drwxr-xr-x 1 Foo Bar 197121      0 Apr 25 17:21 storage/
drwxr-xr-x 1 Foo Bar 197121      0 Apr 25 17:21 tests/
drwxr-xr-x 1 Foo Bar 197121      0 Apr 25 19:55 vendor/
-rw-r--r-- 1 Foo Bar 197121    505 Apr 25 23:14 webpack.mix.js

试试这个:

sudo php artisan cache:clear

其他人也一样。

从项目目录执行。

php artisan cache:clear

然后执行

composer dump-autoload