• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Fetch files from next cloud storage and display in Laravel website

phplaravelapinextcloudsabredav


PHP Snippet 1:

    'disks' => [       
        ...
        'webdav' => [
            'driver'     => 'webdav',
            'baseUri'    => env('NEXTCLOUD_URL'),
            'userName'   => env('NEXTCLOUD_USER'),
            'password'   => env('NEXTCLOUD_PASSWORD'),
            'pathPrefix' => 'remote.php/dav/files/USERNAME_HERE/', // pay attention on closing slash
        ],
    ],

PHP Snippet 2:

NEXTCLOUD_URL=https://nextcloud_base_url/ #https://nextcloud.example.com/
NEXTCLOUD_USER=username
NEXTCLOUD_PASSWORD=password

Related Snippets

strpos(): Argument #1 ($haystack) must be of type string, array given

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Star and Half Star Rating in Laravel

Creating a config file in PHP

Laravel: HTML in notification

Adding custom body class to the custom archive pages

virtctl works when executed via command line but not from php exec()

SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer

PHP function Not Working As Expected From functions.php Include File

WordPress - Dynamically add user ID to the end of a URL

Assign output of PHP function to a variable

Array to string conversion

WHM Enabling mod_rewrite

401 Unauthorized only occurring on some pages in Laravel 8

How to disable only_full_group_by option in Laravel

About Contact Privacy policy Terms and conditions