© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
cakan

TextEntry url

I have a custom page and it displays Infolist with some TextEntries. In my custom page I have this code:
public function fileViewInfolist(Infolist $infolist): Infolist
    {
        return $infolist
            ->record($this->company)
            ->schema([
                TextEntry::make('files.path')
                    ->label('')
                    ->badge()
                    ->color('secondary')
                    ->url('files.path')
                    ->openUrlInNewTab()
            ]);
    }
public function fileViewInfolist(Infolist $infolist): Infolist
    {
        return $infolist
            ->record($this->company)
            ->schema([
                TextEntry::make('files.path')
                    ->label('')
                    ->badge()
                    ->color('secondary')
                    ->url('files.path')
                    ->openUrlInNewTab()
            ]);
    }


So there is a company model which can have multiple files. This will display a list of all files. But I want to be able to have file name displayed to be clickable and link to a file. Issue is that in database (files.path) is stored only a filename. In order to have full url, I must do
asset('storage/'. $filenameFromDB)
asset('storage/'. $filenameFromDB)
. How can I do that?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

TextEntry bulleted()
FilamentFFilament / ❓┊help
2y ago
Infolist TextEntry
FilamentFFilament / ❓┊help
2y ago
TextEntry default configuration
FilamentFFilament / ❓┊help
4mo ago
Mask for TextEntry
FilamentFFilament / ❓┊help
9mo ago