laravel-admin报错Disk [admin] not configured

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

新部署的laravel-admin出现过这个错误,我在config/filesystems.php的disks数组里面添加上

'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_ACCESS_KEY_ID' ),
            'secret' => env( 'AWS_SECRET_ACCESS_KEY' ),
            'region' => env( 'AWS_DEFAULT_REGION' ),
            'bucket' => env( 'AWS_BUCKET' ),
            'url'    => env( 'AWS_URL' ),
        ],
        //新增的数组
        'admin' => [
            'driver' => 'local',
            'root' => public_path('upload'),
            'visibility' => 'public',
            'url' => env('APP_URL') . '/upload/',
        ],
    ],

添加上这数组后问题依然没有解决,有其他小伙伴遇到过这种情况么?

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
superwen
最佳答案

页面缓存问题。我之前也遇到这样的问题。

3年前 评论
讨论数量: 4
德国科隆街头的大胡子

会不会是'url' => env('APP_URL') . '/upload/',这个的问题

3年前 评论
德国科隆街头的大胡子 (作者) 3年前
德国科隆街头的大胡子 (作者) 3年前

配置缓存了吗?清理下试试!

3年前 评论

config/filesystems.php下的disk加入:

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

检查config/admin.php下的upload的disk是否默认为“admin”,不是的话改成admin就行。

3年前 评论
superwen

页面缓存问题。我之前也遇到这样的问题。

3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!