Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Default Image URL Feature #6578

Conversation

Biostate
Copy link
Contributor

I added defaultImageUrl method to show placeholders if model doesn't have any media.

  • Changes have been thoroughly tested to not break existing functionality.
  • New functionality has been documented or existing documentation has been updated to reflect changes.

@what-the-diff
Copy link
Contributor

what-the-diff bot commented May 21, 2023

PR Summary

  • Added a default image URL feature
    Added a default image URL to the ImageColumn, making it convenient for users when no image is provided.
  • Updated documentation for the new feature
    Enhanced the documentation in 03-columns/04-image to clearly explain and showcase the new default image URL feature.

@zepfietje zepfietje added this to the v2 milestone May 21, 2023
@zepfietje zepfietje added the enhancement New feature or request label May 21, 2023
@danharrin
Copy link
Member

danharrin commented May 21, 2023

Maybe this belongs on the base ImageColumn instead? Then use the default in the getImagePath() of both classes

@danharrin
Copy link
Member

The docs should also be moved out of the plugin and into the main image column docs

@zepfietje zepfietje marked this pull request as draft May 21, 2023 08:56
@zepfietje
Copy link
Member

Agree.

Mark as ready for review when you've implemented the requested changes, @Biostate! 😊

@Biostate
Copy link
Contributor Author

I moved the defaultImageUrl to base ImageColumn class then i updated both SpatieMediaLibraryImageColumn and ImageColumn 's getImagePath methods.

@Biostate Biostate marked this pull request as ready for review May 21, 2023 12:40
@danharrin danharrin merged commit 2c3700b into filamentphp:2.x May 21, 2023
10 of 11 checks passed
@danharrin
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants