PHP code example of weldist / spatie-medialibrary-uuid-path-generator
1. Go to this page and download the library: Download weldist/spatie-medialibrary-uuid-path-generator 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/ */
weldist / spatie-medialibrary-uuid-path-generator example snippets
'path_generator' => Weldist\Spatie\MediaLibrary\UuidPathGenerator\PathGenerators\UuidLevel2PathGenerator::class,
'file_remover_class' => Weldist\Spatie\MediaLibrary\UuidPathGenerator\UuidFileRemover::class,
'path_generator' => Weldist\Spatie\MediaLibrary\UuidPathGenerator\PathGenerators\UuidLevel2PathGenerator::class,
bash
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="config"
bash
php artisan media-library:migrate-paths-to-uuid
bash
php artisan media-library:migrate-paths-from-uuid
bash
php artisan media-library:prune-uuid-paths