chore(app): remove legacy-era module-platform, provider, middleware, rule and support sources

This commit is contained in:
Darko Gjorgjijoski
2026-08-21 14:15:49 +02:00
parent 10b76da90d
commit 56cb653a2d
24 changed files with 0 additions and 1418 deletions
-45
View File
@@ -1,45 +0,0 @@
<?php
namespace App\Support\Media;
use App\Platform\Persistence\ModelIdentityMap;
use Spatie\MediaLibrary\MediaCollections\Models\Media;
use Spatie\MediaLibrary\Support\PathGenerator\PathGenerator;
class CustomPathGenerator implements PathGenerator
{
public function getPath(Media $media): string
{
return $this->getBasePath($media).'/';
}
public function getPathForConversions(Media $media): string
{
return $this->getBasePath($media).'/conversations/';
}
public function getPathForResponsiveImages(Media $media): string
{
return $this->getBasePath($media).'/responsive-images/';
}
/*
* Get a unique base path for the given media.
*/
protected function getBasePath(Media $media): string
{
$folderName = null;
if ($media->model_type === ModelIdentityMap::INVOICE_ALIAS) {
$folderName = 'Invoices';
} elseif ($media->model_type === ModelIdentityMap::ESTIMATE_ALIAS) {
$folderName = 'Estimates';
} elseif ($media->model_type === ModelIdentityMap::PAYMENT_ALIAS) {
$folderName = 'Payments';
} else {
$folderName = $media->getKey();
}
return $folderName;
}
}