Skip to content

Conversation

@KennedyTedesco
Copy link
Contributor

The current Attachment::fromPath() method allows adding attachments from file paths, but it isn't immediately clear that URLs can be used with this method. This ambiguity could lead to confusion for users who want to attach files hosted on external URLs.

By adding the Attachment::fromUrl() method, the intent becomes explicit, improving the developer experience.

public function attachments(): array { return [ Attachment::fromUrl('https://host.com/files/file.pdf'), ]; }

Wdyt?

@timacdonald timacdonald marked this pull request as draft September 9, 2024 22:22
@timacdonald timacdonald marked this pull request as ready for review September 9, 2024 22:40
@taylorotwell taylorotwell merged commit dcb8163 into laravel:11.x Sep 11, 2024
@KennedyTedesco KennedyTedesco deleted the attachment branch September 11, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants