laravel-admin 报错 Disk [admin] not configured.

记录下laravel-admin的一个小问题,在修改个人资料时,报错如下:

Disk [admin] not configured, please add a disk config in config/filesystems.php.

在config/filesystems.php中添加:

'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
    ],

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

    's3' => [
        'driver' => 's3',
        'key' => env('AWS_KEY'),
        'secret' => env('AWS_SECRET'),
        'region' => env('AWS_REGION'),
        'bucket' => env('AWS_BUCKET'),
    ],
    // 添加的代码
    'admin' => [
        'driver'     => 'local',
        'root'       => public_path('upload'),
        'visibility' => 'public',
        'url' => env('APP_URL').'/public/upload/',
    ],
    原文作者:jrue
    原文地址: https://segmentfault.com/a/1190000019598233
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞