Complete the code to store an uploaded file in Laravel.
$path = $request->file('avatar')->[1]('avatars');
In Laravel, the store method saves the uploaded file to the specified disk or folder.
Complete the code to get the file's original name in Laravel.
$originalName = $request->file('document')->[1]();
The method getClientOriginalName() returns the original file name from the client.
Fix the error in the code to delete a file from storage in Laravel.
Storage::[1]('public/photos/image.jpg');
The correct method to delete a file in Laravel's Storage facade is delete.
Fill both blanks to check if a file exists and then get its size in Laravel.
if (Storage::[1]('files/report.pdf')) { $size = Storage::[2]('files/report.pdf'); }
exists checks if the file is present, and size returns its size in bytes.
Fill all three blanks to create a symbolic link from storage to public folder in Laravel.
php artisan [1]:[2] --relative=[3]
The command php artisan storage:link --relative=true creates a relative symbolic link for file access.