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

Feature request: Option to hide filename from Detail view #162

Open
miagg opened this issue Jun 5, 2021 · 0 comments
Open

Feature request: Option to hide filename from Detail view #162

miagg opened this issue Jun 5, 2021 · 0 comments

Comments

@miagg
Copy link

miagg commented Jun 5, 2021

First of all this is a great package!

I do wish there was an option to hide the filename from the detail view if displayAsImage() is set.

Right now the only way to solve this is by hiding the field on detail and adding a compute field like this:

  FilemanagerField::make('Avatar', 'avatar_url')
      ->folder('avatars')
      ->filterBy('images')
      ->displayAsImage()
      ->hidefromDetail(),

  Text::make('Avatar', function () {
      return "<img src='$this->avatar' alt='$this->fullName' class='max-w-xs'>";
  })->asHtml()
      ->canSee(function () {
          return $this->avatar_url;
      })
      ->onlyOnDetail(),
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

No branches or pull requests

1 participant