{"id":13532513,"url":"https://github.com/Hanson/laravel-admin-qiniu","last_synced_at":"2025-04-01T20:32:15.811Z","repository":{"id":56983735,"uuid":"239282734","full_name":"Hanson/laravel-admin-qiniu","owner":"Hanson","description":"Laravel admin 框架的七牛 qiniu 多图上传扩展","archived":false,"fork":false,"pushed_at":"2020-03-08T03:32:00.000Z","size":9,"stargazers_count":21,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T18:11:08.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hanson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-09T10:09:33.000Z","updated_at":"2024-05-05T00:47:14.000Z","dependencies_parsed_at":"2022-08-21T11:20:45.983Z","dependency_job_id":null,"html_url":"https://github.com/Hanson/laravel-admin-qiniu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Flaravel-admin-qiniu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Flaravel-admin-qiniu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Flaravel-admin-qiniu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Flaravel-admin-qiniu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hanson","download_url":"https://codeload.github.com/Hanson/laravel-admin-qiniu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709923,"owners_count":20821297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:01:11.529Z","updated_at":"2025-04-01T20:32:10.797Z","avatar_url":"https://github.com/Hanson.png","language":"PHP","funding_links":[],"categories":["扩展包"],"sub_categories":["字段类扩展包"],"readme":"# laravel-admin-qiniu\n\nLaravel admin 框架的七牛 qiniu 多图上传扩展，可拖拽，异步上传图片，支持删除\n\n![1_7M_G0VFANP6HK48EEL2QO.png](https://i.loli.net/2020/02/09/Hys9IGfjWloc8Fm.png)\n\n![__FP8P8`VX`LN_Y3__4K762.png](https://i.loli.net/2020/02/09/hMFqysDLK4vZaOx.png)\n\n## 安装\n\n`composer require hanson/laravel-admin-qiniu:dev-master -vvv`\n\n## 配置\n\n在 `config/filesystems.php` 增加一个 disk\n\n```php\n\u003c?php\n\nreturn [\n   'disks' =\u003e [\n        //...\n        'qiniu' =\u003e [\n           'driver'     =\u003e 'qiniu',\n           'access_key' =\u003e env('QINIU_ACCESS_KEY', 'xxxxxxxxxxxxxxxx'),\n           'secret_key' =\u003e env('QINIU_SECRET_KEY', 'xxxxxxxxxxxxxxxx'),\n           'bucket'     =\u003e env('QINIU_BUCKET', 'xxx'),\n           'domain'     =\u003e env('QINIU_DOMAIN', 'xxx.clouddn.com'), // or host: https://xxxx.clouddn.com\n        ],\n        //...\n    ]\n];\n```\n\n## 使用\n\n```php\n\u003c?php\n\n$form = new \\Encore\\Admin\\Form(new Goods);\n\n$form-\u003eqiniuImages('column', '商品图')-\u003esortable(); // 普通用法\n\n$form-\u003eqiniuImages('column', '商品图')\n    -\u003esortable() // 让图片可以拖拽排序\n    -\u003eextraData(['disk' =\u003e 'qiniu2', 'path' =\u003e 'avatar']) // 假如你有多个七牛配置，可以通过指定此处的 disk 进行上传， path 为文件路径的前缀\n    -\u003evalue(['http://url.com/a.jpg', 'http://url.com/b.jpg']); // 默认显示的图片数组，必须为 url\n\n$form-\u003esaving(function (\\Encore\\Admin\\Form $form) {\n    $paths = \\Hanson\\LaravelAdminQiniu\\Qiniu::getPaths(request('qiniu_column')); // 需要 qiniu_ 作为前缀的字段\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHanson%2Flaravel-admin-qiniu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHanson%2Flaravel-admin-qiniu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHanson%2Flaravel-admin-qiniu/lists"}