Hmmm... your code is spot on here... so it's gotta be that the directory isn't writable.
You could use this to check:
dd(is_writable($path . $fileName));
I come to this conclusion because of the error being 'NotWritableException' and because your code is solid.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us