base_path; if ($filepath !== '') { $path .= '/' . ltrim($filepath, '/'); } return Storage::disk($disk)->putFile($path, $file); } }