How to make a URL column?
Is there anything like Forms\Components*Url*::make?
where you can provide a display text and url, and it will render a link
Solution:Jump to solution
The url method accepts a callback so you can just access the record object to get any property from the model, something like this (obviously no idea what your column setup is)
...
3 Replies
You can use the
->url()
method available on TextColumn to give it the url https://filamentphp.com/docs/3.x/tables/columns/getting-started#opening-urlsOk, But if I have the link text from one model field, and the link url from another model field, how can it all come together?
Solution
The url method accepts a callback so you can just access the record object to get any property from the model, something like this (obviously no idea what your column setup is)