nino / laravel-nextcloud-fs
Laravel Nextcloud Filesystem
Installs: 2 449
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^8.2
- illuminate/filesystem: ^10.38 || ^11.21 || ^12.0
- league/flysystem-webdav: ^3.28
- sabre/uri: >=2.2.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.62
- orchestra/testbench: ^9.3 || ^10.1
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^11.5 || ^10.1 || ^9.6
This package is auto-updated.
Last update: 2025-03-16 11:27:08 UTC
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).