我已经成功安装了带有 Sail 的 Laravel,应用程序很好,我可以使用 sail up
运行它。但是我无法迁移数据库,每次运行 sail artisan migrate
都会抛出以下错误。
There is no existing directory at "/home/dariel/www/2021/nsmart/storage/logs" and it could not be created: Permission denied
at vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:172
168▕ set_error_handler([$this, 'customErrorHandler']);
169▕ $status = mkdir($dir, 0777, true);
170▕ restore_error_handler();
171▕ if (false === $status && !is_dir($dir)) {
➜ 172▕ throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and it could not be created: '.$this->errorMessage, $dir));
173▕ }
174▕ }
175▕ $this->dirCreated = true;
176▕ }
+10 vendor frames
11 [internal]:0
Illuminate\Foundation\Bootstrap\HandleExceptions::handleException()
我被困在这一点上,任何帮助将不胜感激。提前致谢。
最佳答案
你可以试试这个
php artisan route:clear;
php artisan config:clear;
php artisan cache:clear;
sail artisan migrate;
关于php - Laravel Sail 无法运行 artisan migrate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66684936/