承接 bjthecod3r/laravel-cloudflare-stream 相关项目开发

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

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

bjthecod3r/laravel-cloudflare-stream

最新稳定版本:v1.1.0

Composer 安装命令:

composer require bjthecod3r/laravel-cloudflare-stream

包简介

A Laravel package for Cloudflare Stream.

README 文档

README

Laravel Cloudflare Stream Logo

Build Status Total Downloads Latest Version License

Laravel Cloudflare Stream

A Laravel Package for working with Cloudflare Stream seamlessly

Supports Laravel 10, 11, 12, and 13.

Installation

Run

composer require bjthecod3r/laravel-cloudflare-stream

Configuration

You may publish the configuration file using this command:

php artisan vendor:publish --provider="Bjthecod3r\CloudflareStream\CloudflareStreamServiceProvider"

A configuration file named cloudflare-stream with some defaults and required properties will be placed in your config directory.

Usage

Open your .env file and add the following variables, remember to substitute the actual values

CLOUDFLARE_API_TOKEN=xxxxxxxxxxxx
CLOUDFLARE_ACCOUNT_ID=xxxxxxxxxxxxxxxxx
CLOUDFLARE_API_BASE_URL=https://api.cloudflare.com/client/v4/accounts
CLOUDFLARE_KEY_ID=xxxxxxxxxxxxxxx

Using the package is pretty straight forward, you can make use of the class like you would do any in Laravel. There is also support for facade.

use Bjthecod3r\CloudflareStream\CloudflareStream;

use Bjthecod3r\CloudflareStream\Facades\CloudflareStream as CloudflareStreamFacade;

class StreamService
{
    public function fetchStream(string $id, CloudflareStream $cloudflareStream)
    {
        dd($cloudflareStream->fetchVideo($id));
    }
    
    public function fetchVideo(string $id): array
    {
        return CloudflareStreamFacade::fetchVideo($id);
    }
}

Note

This package currently covers my current usage of cloudflare stream, although, in the next couple of weeks I plan to expand its features. However, if there is a need for a particular feature, feel free to reach out to me via fabulousbj@hotmail.com, and I'll gladly attend to it.

Todo

  • Improve tests
  • Add the remaining useful features available on Cloudflare Stream

Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

Releases

GitHub releases are managed with Google's release-please action.

  • Merge conventional commits such as fix:, feat:, or feat!: into main.
  • release-please will open or update a Release PR with the next version and changelog changes.
  • Merging that Release PR creates the GitHub release and the next v* tag automatically.
  • If you want other workflows to run on Release PRs or release tags, add a RELEASE_PLEASE_TOKEN secret with a PAT; otherwise the workflow falls back to GITHUB_TOKEN.
  • In GitHub repo settings, enable Settings > Actions > General > Allow GitHub Actions to create and approve pull requests.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 20
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固