PHP code example of nino / laravel-nextcloud-fs

1. Go to this page and download the library: Download nino/laravel-nextcloud-fs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nino / laravel-nextcloud-fs example snippets


use Illuminate\Support\Facades\Storage;
 
Storage::disk('nextcloud')->put('example.txt', 'Contents');
 php
// 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
    ],
	...
];