I'm searching for this syntax but I cannot find any explanation... I found some examples but everyone is using the method storeAs(), store() or move() straight away.
I can't understand what $file_contents is. What is this for? What shall it contain?
Put is used to store contents in a file. So $file_content
being the data you want to store in 'filename'
.
https://laravel.com/docs/5.6/filesystem#storing-files
This would be similar to file_put_contents.