1. Go to this page and download the library: Download everzel/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/ */
everzel / nova-file-manager example snippets
// NovaServiceProvider.php
use Everzel\NovaFileManager\NovaFileManager;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
// ...
public function tools(): array
{
return [
// ... any other tools
NovaFileManager::make(),
];
}
}
// app/Nova/User.php
use Everzel\NovaFileManager\FileManager;
class User extends Resource
{
// ...
public function fields(NovaRequest $request): array
{
return [
// ... any other fields
FileManager::make(__('Avatar'), 'avatar'),
];
}
}