I was reading Laravel documentation, and came across the following example which I didn't quite understand:
use Illuminate\Support\Facades\Storage;
Storage::put('file.jpg', $contents);
Storage::put('file.jpg', $resource);
I understand that the arg1 is the path of file or directory and the arg2 is the content to be written into file or file to be saved into directory. However, I don't quite understand the PHP resource here. Is there anything I could use the PHP recourse on a jpg file? Or the document actually means that I could save a PHP resource into the directory, but it just misplaced a jpg example instead of directory?
Anyone could help will be so much appreciated.