file_put_contents(): write of 1847 bytes failed with errno=13 Permission denied – Laravel

file_put_contents(): write of 1847 bytes failed with errno=13 Permission denied in Laravel

 

If you get above error, follow below steps to resolve this:

1) Change permissions of the storage directory

chmod -R 777 storage

2)Run below command

composer dump-autoload