for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Cortex\Foundation\Generators;
use Spatie\MediaLibrary\Models\Media;
use Spatie\MediaLibrary\PathGenerator\BasePathGenerator;
class PathGenerator extends BasePathGenerator
{
protected function getBasePath(Media $media): string
return str_plural(str_slug($media->model->getMorphClass())).'/'.$media->collection_name.'/'.$media->getKey();
}