Skip to content

Conversation

bussnet
Copy link

@bussnet bussnet commented Aug 21, 2020

Show an link action in the toast message (if url exists), to direct open or download a given url direct from the toast message.

Also possible to change the name of the action (default=link) with adding url_name to the Notification toArray() method

    public function toArray($notifiable) {
        return [
            'level' => $this->level,
            'message' => $this->message,
            'url' => $this->url,
            'url_name' => $this->target == '__blank'?'link':'download',
            'target' => $this->target,
        ];
    }

bussnet added 3 commits August 21, 2020 11:13
Show an link action in the toast message (if url exists), to direct open or download a given url direct from the toast message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant