Skip to content

[12.x] Add attachment helper method to add attachment from cloud storage - #58201

Merged
taylorotwell merged 3 commits into
laravel:12.xfrom
PhiloNL:feature/add-atttachment-from-cloud-storage
Dec 24, 2025
Merged

taylorotwell merged 3 commits into
laravel:12.xfrom
PhiloNL:feature/add-atttachment-from-cloud-storage

Conversation

@PhiloNL

@PhiloNL PhiloNL commented Dec 23, 2025 •

Copy link
Copy Markdown
Contributor

Laravel already has a convenient helper like Storage::cloud() to have a simple and unified approach when dealing with the apps main cloud based file system. This PR adds a new addition to make it easier to add attachments to emails that are stored on the cloud.

// Before:
Attachment::fromStorageDisk(Storage::getDefaultCloudDriver(), $attachment->path);

// After:
Attachment::fromCloudStorage($attachment->path);

@PhiloNL PhiloNL changed the title [12.x] Add option to add attachment from cloud storage [12.x] Add attachment helper method to add attachment from cloud storage Dec 23, 2025
@taylorotwell
taylorotwell merged commit e53cfc7 into laravel:12.x Dec 24, 2025
70 checks passed
@PhiloNL
PhiloNL deleted the feature/add-atttachment-from-cloud-storage branch December 25, 2025 15:01
akyrey pushed a commit to akyrey/framework that referenced this pull request Dec 29, 2025
…age (laravel#58201)

* Add option to add attachment from cloud storage

* Use facade instead to get current cloud driver

* Update documentation for mail attachment methods

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants