laravel-admin 报错 | Disk [admin] not configured, please add a disk config in `config/filesystems.php`.

laravel-admin 报错 | Disk [admin] not configured, please add a disk config in `config/filesystems.php`.

万能青年
2022-03-14 / 0 评论 / 201 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2022年07月10日,已超过747天没有更新,若内容或图片失效,请留言反馈。

config/filesystems.php 添加admin 文件上传配置

      'admin' => [
        'driver'     => 'local',
        'root'       => public_path('upload'),
        'visibility' => 'public',
        'url' => env('APP_URL').'/upload/',
    ],

最终效果

'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').'/upload/',
    ],

],
0

评论 (0)

取消