Trying to create a download button for my table builder but it isn't working
Created 1 year ago by edster

So 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',

edster  —  1 year ago Best Answer

Once again, thanks @craigberry

its href not url

ryanthompson  —  1 year ago

Ya think of them as definitions for the HTML/objects them selves. Links don't have URL they have HREF properties 😊