在laravel 5.4(存储文件夹)中更改默认的“符号链接”文件夹

I'm making a new version of my site with laravel 5.4 and want to keep the same links than my old site has.

My old site has links images like this: domain.com/uploaded/cat.jpg

In laravel, its necesary to create a symbolic link to show the stored images but it saved them with a default folder named storage", like this: domain.com/storage/cat.jpg

How can i change the default name to "uploaded" or whatever?

I tried to change url inside the file \config\filesystems.php with this:

Before

'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
    ],

After

'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'url' => env('APP_URL').'/uploaded',
        'visibility' => 'public',
    ],

and my controller

$request->file('image')->storeAs('public', 'example.jpg');

Make sure you've created a symlink.

According to your configuration, you can run this command :

ln -s storage/app/public public/uploaded

Then, you can access your files :

Storage::disk('public')->url('example.jpg')

Or simply using asset() helper :

asset('uploaded/example.jpg');

Execute this code in your server using any php file to create the symbolic link. Once the link has been created, the files will become publicly accessible.

target = '/home/cfrcoclm/public_html/agencies/storage/app/public'
shortcut = '/home/cfrcoclm/public_html/agencies/uploaded' symlink(target, shortcut) ec ho("Link Created!") `

In case you do not have SSH access, you can as well write this one-line script below and run it on your server - taking into consideration the right directory path

symlink('/home/domainname/laravelprojectname/storage/app/public','/home/domainname/public_html/storage');