Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add default disk.
WHY
BEFORE - What was wrong? What was happening before this PR?
While uploading an image using
image field
it uploads to the default disk in my case ispublic
but when usingimage columns
it returns data value from DB with the asset function which is not correct because it's uploaded to storage path or to be more clear upload based on default disk path.AFTER - What is happening after this PR?
Define default disk to
image columns
so it's not required me to write disk for each image column I have so it's use default one which is used in the field as well.HOW
How did you achieve that, in technical terms?
by adding this row
$column['disk'] = $column['disk'] ?? config('filesystems.default');
to check if this column has a different disk name to use or use the default one.
Is it a breaking change?
No, I don't think so.
How can we test the before & after?
upload an image using the image field then show it in a table using the image column without define disk.
If the PR has changed in multiple repos please provide the command to checkout all branches, eg.: