Skip to content

add a clickable link to the toast notification #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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,
        ];
    }

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