79361104

Date: 2025-01-16 10:12:47
Score: 1
Natty:
Report link

Found the issue.

It was a problem with my CustomPathGenerator class for the media package, namely on the getPath function:

 public function getPath(Media $media) : string
    {
        if ($media->model_type === 'agent') {
            return 'cms/agentes/' . Agent::find($media->model_id)->slug .'/';

        }elseif ($media->model_type === 'store') {
            return 'cms/lojas/' . $media->model_id  .'/';
        }
        
        return $media->getKey();
        
    }
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Zeli Torres