承接 infernalmedia/laravel-gitea-storage 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

infernalmedia/laravel-gitea-storage

最新稳定版本:v0.0.4

Composer 安装命令:

composer require infernalmedia/laravel-gitea-storage

包简介

A Gitea Storage driver for Laravel

README 文档

README

A Gitea Storage driver for Laravel

Latest Version MIT Licensed Total Downloads

This package is a wrapper bridging Flysystem-Gitea-storage into Laravel as an available storage disk.

This is a fork from the dashing RoyVoetman/laravel-gitlab-storage package which has been adapted to work with Gitea's API.

Installation

composer require infernalmedia/laravel-gitea-storage

Add a new disk to your filesystems.php config

'gitea' => [
    'driver'                => 'gitea',
    'personal-access-token' => env('GITEA_ACCESS_TOKEN', ''), // Personal access token
    'username'              => env('GITEA_USERNAME'),
    'repository'            => env('GITEA_REPOSITORY'), // your repo
    'branch'                => env('GITEA_BRANCH', 'main'), // Branch that should be used
    'base-url'              => env('GITEA_BASE_URL', 'https://gitea.com'), // Base URL of Gitea server you want to use
],

Access token (required for private projects)

Gitea supports server side API authentication with Personal Access tokens

Personal Access Token can be created from the Settings page of your user account.

Username

This is the username or the organization name under which repositories are stored.

Repository

Name of the repository.

Base URL

This will be the URL where you host your gitea server (e.g. https://gitea.com)

Usage

$disk = Storage::disk('gitea');

// 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.md and 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.

统计信息

  • 总下载量: 153
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固