How to use external links in table builder? Please help

I'm new to Filament and I'm having trouble accessing an external link. I have a client resource, and each one of them has an external link (website) that is mandatory. However, when I try to access the link by clicking on the icon in the table, Filament automatically adds 'localhost' before the link Example: In my database i have this url URL = www.test.com When I press the icon, it redirects me to the page localhost/admin/www.test.com.
Tables\Columns\IconColumn::make('url')
->label('Link')
->icon('heroicon-o-link')
->url(fn($record) => $record->url, true)
Tables\Columns\IconColumn::make('url')
->label('Link')
->icon('heroicon-o-link')
->url(fn($record) => $record->url, true)
Tks
Solution:
it redirects me to the page localhost/admin/www.test.com.
That's standard browser behaviour. www.test.com is not an absolute link. You need https:// in front of it. Either add it to your DB or add it via ->url()...
Jump to solution
2 Replies
Solution
Dennis Koch
Dennis Koch6mo ago
it redirects me to the page localhost/admin/www.test.com.
That's standard browser behaviour. www.test.com is not an absolute link. You need https:// in front of it. Either add it to your DB or add it via ->url()
pepedra
pepedra6mo ago
Thank you, I appreciate it. Resolved
Want results from more Discord servers?
Add your server