royvoetman/laravel-gitlab-storage
Composer 安装命令:
composer require royvoetman/laravel-gitlab-storage
包简介
A Gitlab Storage driver for Laravel
README 文档
README
A Gitlab Storage driver for Laravel
This package is a wrapper bridging Flysystem-Gitlab-storage into Laravel as an available storage disk.
Installation
composer require royvoetman/laravel-gitlab-storage
Add a new disk to your filesystems.php config
'gitlab' => [ 'driver' => 'gitlab', 'personal-access-token' => env('GITLAB_ACCESS_TOKEN', ''), // Personal access token 'project-id' => env('GITLAB_PROJECT_ID'), // Project id of your repo 'branch' => env('GITLAB_BRANCH', 'master'), // Branch that should be used 'base-url' => env('GITLAB_BASE_URL', 'https://gitlab.com'), // Base URL of Gitlab server you want to use ],
Access token (required for private projects)
Gitlab supports server side API authentication with Personal Access tokens
For more information on how to create your own Personal Access token: Gitlab Docs
Project ID
Every project in Gitlab has its own Project ID. It can be found at to top of the frontpage of your repository. See
Base URL
This will be the URL where you host your gitlab server (e.g. https://gitlab.com)
Usage
$disk = Storage::disk('gitlab'); // create a file $disk->put('images/', $fileContents); // check if a file exists $exists = $disk->exists('file.jpg'); // copy a file $disk->copy('old/file1.jpg', 'new/file1.jpg'); // move a file $disk->move('old/file1.jpg', 'new/file1.jpg'); // See https://laravel.com/docs/filesystem for a full list of all the available functionality
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github.
Pull Requests
- PSR-2 Coding Standard - The easiest way to apply the conventions is to install PHP Code Sniffer.
- Document any change in behaviour - Make sure the
README.mdand any other relevant documentation are kept up-to-date. - Create feature branches - Don't ask us to pull from your master branch.
- One pull request per feature - If you want to do more than one thing, send multiple pull requests.
License
The MIT License (MIT). Please see License File for more information.
royvoetman/laravel-gitlab-storage 适用场景与选型建议
royvoetman/laravel-gitlab-storage 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.91k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2019 年 08 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 royvoetman/laravel-gitlab-storage 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 royvoetman/laravel-gitlab-storage 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.91k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-02