Problem when Laravel-Admin image upload

About the laravel-admin has entered the picture upload page, you will be prompted information is not configured storage path. At this point need to configure.

View config / admin.php there

   
   'Upload' => [ 

        // Disk in `config / filesystem.php`. 
        'Disk' => 'ADMIN', 

        // File and Image Upload The path an under Disk above. 
        'Directory' => [ 
            'Image' => 'ImagesRF Royalty Free', 
            'File' => 'Files', 
        ], 
    ], 


// tell us at this time is stored in the configuration admin, where, but config / filesystem.php in the disk configuration is as follows: 
    ' Disks' => [ 

        'local '=> [ 
            ' Driver '=>' local ', 
            ' the root '=> the storage_path (' App '), 
        ], 

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

        'S3' => [ 
            'Driver' => 'S3', 
            'Key' => the env ( 'AWS_ACCESS_KEY_ID'), 
            'Secret' => the env ( 'AWS_SECRET_ACCESS_KEY'), 
            'Region '=> the env (' AWS_DEFAULT_REGION '), 
            ' bucket '=> the env (' AWS_BUCKET '), 
            ' URL '=> the env (' AWS_URL '), 
        ], 

    ], 

there are local, pulic, s3, then we can configure a admin, can also be config / admin.php in the 
disk => 'admin' into disk => 'public' to point to public path to go. 


this solves the problem of error, but not good, it's just there is storage / app / public there, so we still have to perform a soft link at: 

PHP Artisan Storage: link 

this just fine.

  

Guess you like

Origin www.cnblogs.com/bing2017/p/11365117.html