laravel-desktop-notifier icon indicating copy to clipboard operation
laravel-desktop-notifier copied to clipboard

How to set hyperlink url?

Open Rakesh2907 opened this issue 4 years ago • 1 comments

Hello,

How to set hyperlink url for when click on notification open target page.

Rakesh2907 avatar Feb 12 '21 17:02 Rakesh2907

It looks like there is only support for it in the TerminalNotifierNotifier class, however, you'd have to use the underlying notification class directly and append $notification->addOption('url', 'https://example.com'); such as (this untested example):

app(\Joli\JoliNotif\Notifier\TerminalNotifierNotifier::class)->send(
    app(\Joli\JoliNotif\Notification::class)
      ->setTitle($text)
      ->setBody($body)
      ->setOption('url', 'https://example.com');
);

Note: This also would only work on Mac OS X 10.8 and higher, and requires terminal-notifier to be installed. 😕

owenvoke avatar Feb 15 '21 09:02 owenvoke