Trying to create a download button for my table builder but it isn't working
Created 7 years ago by edsterSo the code I have below is basically working, except the URL
part, even if I hard-code in a URL, it doesn't work :/
public function handle(DocumentTableBuilder $builder)
{
$buttons = [
'download' => [
'url' => function ($entry) {
return url('/commercial_portal' . $entry['document']->folder . $entry['document']->name);
},
'text' => 'Download',
'icon' => 'fa fa-download',
'type' => 'success',
],
];
$builder->setButtons($buttons);
}
ryanthompson
—
7 years ago
Ya think of them as definitions for the HTML/objects them selves. Links don't have URL they have HREF properties 😊
Once again, thanks @craigberry
its
href
noturl