定制 nino/laravel-nextcloud-fs 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

nino/laravel-nextcloud-fs

最新稳定版本:2.1.0

Composer 安装命令:

composer require nino/laravel-nextcloud-fs

包简介

Laravel Nextcloud Filesystem

README 文档

README

This package provides a Nextcloud driver for Laravel's Filesystem.

It's a wrapper around Flysystem's WebDAV Adapter.

Compatibility

Laravel : 12, 11, 10

PHP : 8.4, 8.3, 8.2

Install

Via Composer

composer require nino/laravel-nextcloud-fs

Usage

Generate a Nextcloud app password on the desired user's account: Settings > Security > Devices & sessions.

Create a nextcloud filesystem disk:

// config/filesystems.php

'disks' => [
	...
    'nextcloud' => [
        'driver'     => 'nextcloud',
        'baseUri'    => 'https://nextcloud.example.org',
        'userName'   => 'laravel',
        'password'   => 'password-generated-by-nextcloud',
        'directory' => '', // optionnal: set a path as visible for nextcloud user defined in userName
    ],
	...
];

Use it as any Laravel filesystem : https://laravel.com/docs/filesystem

use Illuminate\Support\Facades\Storage;
 
Storage::disk('nextcloud')->put('example.txt', 'Contents');

Note that file visibility features aren't supported (it's a WebDAV limitation).

Contributing

Merge requests, bug reports and suggestions are welcome.

Please follow the following rules on your pull requests:

  • One pull request per feature.
  • Make sure each individual commit in your pull request is meaningful.
  • Document any change in behaviour.
  • Update the tests if necessary.

License

This library is licensed under the MIT License. Please read the license file for more information.

It's based on the work of Protone Media : pbmedia/laravel-webdav (also under MIT license).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-20