src/Attachment/Models/Attachment.php
public function url($default = null): ?string
    {
        $disk = $this->getAttribute('disk');

        if (Storage::disk($disk)->exists($this->physicalPath())) {
            return Storage::disk($disk)->url($this->physicalPath());
        }

        return $default;
    }
public function url($default = null): ?string
    {
        $disk = $this->getAttribute('disk');

        if (Storage::disk($disk)->exists($this->physicalPath())) {
            return Storage::disk($disk)->url($this->physicalPath());
        }

        return $default;
    }
public function url ( $ default = null ) : ? string { $ disk = $ this -> getAttribute ( 'disk' ) ; if ( Storage :: disk ( $ disk ) -> exists ( $ this -> physicalPath ( ) ) ) { return Storage :: disk ( $ disk ) -> url ( $ this -> physicalPath ( ) ) ; } return $ default ; }
Return the address by which you can access the file.

@param string $default

@return string|null
Return the address by which you can access the file .