PHP code example of oneduo / nova-file-manager

1. Go to this page and download the library: Download oneduo/nova-file-manager 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/ */

    

oneduo / nova-file-manager example snippets


// NovaServiceProvider.php

use Oneduo\NovaFileManager\NovaFileManager;

class NovaServiceProvider extends NovaApplicationServiceProvider
{
    // ...

    public function tools(): array
    {
        return [
            // ... any other tools
            NovaFileManager::make(),
        ];
    }
}

// app/Nova/User.php

use Oneduo\NovaFileManager\FileManager;

class User extends Resource
{
    // ...

    public function fields(NovaRequest $request): array
    {
        return [
            // ... any other fields
            FileManager::make(__('Avatar'), 'avatar'),
        ];
    }
}
bash
php artisan vendor:publish --tag="nova-file-manager-config"