PHP code example of pavlovich4 / livewire-filemanager

1. Go to this page and download the library: Download pavlovich4/livewire-filemanager 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/ */

    

pavlovich4 / livewire-filemanager example snippets


 'custom_path_generators' => [
        \Pavlovich4\LivewireFilemanager\Models\File::class => \Pavlovich4\LivewireFilemanager\Support\CustomPathGenerator::class,
        // or
        // 'model_morph_alias' => PathGenerator::class
    ],

return [
    // Storage disk to use (default: 'public')
    'disk' => 'public',

    // Media library configuration
    'media' => [
        'path_generator' => Pavlovich4\LivewireFilemanager\Support\CustomPathGenerator::class,
    ],
];
bash
php artisan vendor:publish --tag="livewire-filemanager-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="livewire-filemanager-config"
bash
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-config"
bash
php artisan storage:link