diff --git a/app/Notifications/NewPluginAvailable.php b/app/Notifications/NewPluginAvailable.php index 421ed730..a87c4809 100644 --- a/app/Notifications/NewPluginAvailable.php +++ b/app/Notifications/NewPluginAvailable.php @@ -34,7 +34,7 @@ public function toMail(object $notifiable): MailMessage ->subject("New Plugin: {$this->plugin->name}") ->greeting('A new plugin is available!') ->line("**{$this->plugin->name}** has just been added to the NativePHP Plugin Marketplace.") - ->action('View Plugin', url('/plugins')) + ->action('View Plugin', route('plugins.show', $this->plugin->routeParams())) ->line('You can manage your notification preferences in your account settings.'); } @@ -48,6 +48,8 @@ public function toArray(object $notifiable): array 'body' => "{$this->plugin->name} has just been added to the NativePHP Plugin Marketplace.", 'plugin_id' => $this->plugin->id, 'plugin_name' => $this->plugin->name, + 'action_url' => route('plugins.show', $this->plugin->routeParams()), + 'action_label' => 'View Plugin', ]; } } diff --git a/app/Notifications/PluginApproved.php b/app/Notifications/PluginApproved.php index 3161602b..75dd33a2 100644 --- a/app/Notifications/PluginApproved.php +++ b/app/Notifications/PluginApproved.php @@ -35,7 +35,7 @@ public function toMail(object $notifiable): MailMessage ->subject('Your Plugin Has Been Approved!') ->greeting('Great news!') ->line("Your plugin **{$this->plugin->name}** has been approved and is now listed in the NativePHP Plugin Marketplace.") - ->action('View Plugin Marketplace', url('/plugins')) + ->action('View Plugin', route('plugins.show', $this->plugin->routeParams())) ->line('Thank you for contributing to the NativePHP ecosystem!'); } @@ -51,6 +51,8 @@ public function toArray(object $notifiable): array 'body' => "{$this->plugin->name} is now listed in the NativePHP Plugin Marketplace.", 'plugin_id' => $this->plugin->id, 'plugin_name' => $this->plugin->name, + 'action_url' => route('plugins.show', $this->plugin->routeParams()), + 'action_label' => 'View Plugin', ]; } } diff --git a/app/Notifications/PluginRejected.php b/app/Notifications/PluginRejected.php index e743d894..230fbda7 100644 --- a/app/Notifications/PluginRejected.php +++ b/app/Notifications/PluginRejected.php @@ -37,7 +37,7 @@ public function toMail(object $notifiable): MailMessage ->line("Unfortunately, your plugin **{$this->plugin->name}** was not approved for the NativePHP Plugin Marketplace.") ->line('**Reason:**') ->line($this->plugin->rejection_reason) - ->action('View Your Plugins', route('customer.plugins.index')) + ->action('View Plugin', route('customer.plugins.show', $this->plugin->routeParams())) ->line('If you have questions about this decision, please reach out to us.'); } @@ -54,6 +54,8 @@ public function toArray(object $notifiable): array 'plugin_id' => $this->plugin->id, 'plugin_name' => $this->plugin->name, 'rejection_reason' => $this->plugin->rejection_reason, + 'action_url' => route('customer.plugins.show', $this->plugin->routeParams()), + 'action_label' => 'View Plugin', ]; } } diff --git a/resources/views/livewire/customer/notifications.blade.php b/resources/views/livewire/customer/notifications.blade.php index 46b472d0..6858eca2 100644 --- a/resources/views/livewire/customer/notifications.blade.php +++ b/resources/views/livewire/customer/notifications.blade.php @@ -1,5 +1,5 @@