两个laravel项目的一个上传目录

two Laravel project are installed under root and root/superadmin in my domain. both projects have upload feature. So I want a common upload directory for both.

I tried public_path('/uploads/') which points to public/uploads for each Laravel. Are they any ways to configure upload image goes to like public_html/uploads/ and from both projects I can access them.

You can change your config file to include an absolute path. In config/filesystems.php set root to the absolute path of your upload folder.

...
'public' => [
    'driver' => 'local',
    'root' => /var/absolute/path/goes/here,
    'url' => env('APP_URL').'/storage',
    'visibility' => 'public',
]
...