PHP code example of xylis / laravel-nextcloud

1. Go to this page and download the library: Download xylis/laravel-nextcloud 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/ */

    

xylis / laravel-nextcloud example snippets


// config/app.php

'providers' => [
    ...
    Jedlikowski\NextCloudStorage\NextCloudServiceProvider::class
    ...
];

// config/filesystems.php

'disks' => [
	...
	'nextcloud' => [
	    'driver'     => 'nextcloud',
	    'baseUri'    => 'https://mywebdavstorage.com',
	    'userName'   => 'johndoe',
	    'password'   => 'secret',
	    'pathPrefix' => '', // provide a subfolder name if your NextCloud instance isn't running directly on a domain, e.g. https://example.com/drive
	],
	...
];