file_put_content...fail to open stream:Permission denied in Laravel 5
is a file permissions issue as lesssugar said , you need to give writte permissions to the storage folder , so go to your html/Tranining-management-system.. folder an then you can do :
chmod -R 0777 storage/
That will change to writte access Recursively .
Please read the configuration section in docs :
http://laravel.com/docs/master#configuration
You have to do the same with the cache folder.
I run php artisan view:cache
and it solved the issue