atomicptr/laravel-github-storage 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

atomicptr/laravel-github-storage

最新稳定版本:v0.1.2

Composer 安装命令:

composer require atomicptr/laravel-github-storage

包简介

A GitHub based filesystem for Laravel

README 文档

README

A GitHub based filesystem for Laravel, powered by php-github-api.

Note: Keep in mind that GitHub has a rate limit, so if you need a lot of file operations you might need something else.

Installation

composer require atomicptr/laravel-github-storage

Add a new disk to your filesystems.php configuration file

'github' => [
    'driver' => 'github',
    'token' => env('GITHUB_STORAGE_TOKEN', ''),
    'username' => env('GITHUB_STORAGE_USERNAME', ''),
    'repository' => env('GITHUB_STORAGE_REPOSITORY', ''),
    'branch' => env('GITHUB_STORAGE_BRANCH', 'master'),
    'prefix' => env("GITHUB_STORAGE_PREFIX", ''),
],

also add the service provider to your bootstrap/providers.php file

<?php

return [
    App\Providers\AppServiceProvider::class,
    // This line:
    Atomicptr\LaravelGithubStorage\GithubStorageServiceProvider::class,
];

Usage

<?php

$storage = Storage::disk('github');

if (! $storage->exists('assets/image.jpg')) {
    $storage->put('assets/', $imageFileContent);
}

// See https://laravel.com/docs/filesystem

License

MIT

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-18