Laravel 5 show ErrorException file_put_contents fa

2020-01-30 07:37发布

I have a project on Laravel 5 and I work with it at the office and at home too. It works fine, but recently at home it stopped working. Laravel show me two ErrorException

file_put_contents(G:\project\storage\framework\views/751d8a0fd8a7d4138c09ceb6a34bb377aa2d6265.php):
failed to open stream: No such file or directory

and

file_put_contents(G:\project\storage\framework/sessions/aIXycR4LIAUBVIqZu0T590paOMIpV8vfZGIroEp0):
failed to open stream: No such file or directory

I'm searching problem decision with Google and find information about correct rights. All advice is about Linux, but I'am work in Windows at the office and at home too.

When I try to clear application cache and view cache, artisan talk to me - ...cleared. But cache data and views are present in storage.

How can I fix this problem?

Thanks in advance!

14条回答
2楼-- · 2020-01-30 08:08

Try with these commands that have been useful with those errors

path\project\storage\framework\views...

php artisan view:clear

path\project\storage\framework/sessions...

php artisan config:cache
查看更多
一纸荒年 Trace。
3楼-- · 2020-01-30 08:09

I had similar problems because of .gitignore for the /storage folder on first machine, then cloned repository on second machine and laravel was revision to write down sessions cache

So, manually creating folder /storage/sessions might be an solution..

查看更多
登录 后发表回答