From 1d0231f6f3425efe4c39d6f99b6e077930d3d5d1 Mon Sep 17 00:00:00 2001 From: mahdihty Date: Mon, 8 Mar 2021 19:04:39 +0330 Subject: [PATCH] complete Fcm push notification channel, message, notification add fcm_token to Fingerprint model --- app/Notifications/MailNotification.php | 5 +++-- config/fcm.php | 18 ++++++++++++++++++ resources/lang/fa/notification.php | 7 ++++++- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 config/fcm.php diff --git a/app/Notifications/MailNotification.php b/app/Notifications/MailNotification.php index abe937b..af60d57 100644 --- a/app/Notifications/MailNotification.php +++ b/app/Notifications/MailNotification.php @@ -67,9 +67,10 @@ class MailNotification extends Notification //implements ShouldQueue public function toMail($notifiable) { return (new MailMessage) + ->greeting($this->message['greeting']) ->line($this->message['body']) - ->action('Notification Action', url('/')) - ->line('Thank you for using our application!'); + ->subject($this->message['subject']) + ->action('Notification Action', url('/')); } /** diff --git a/config/fcm.php b/config/fcm.php new file mode 100644 index 0000000..9105e5e --- /dev/null +++ b/config/fcm.php @@ -0,0 +1,18 @@ + env('FCM_KEY'), + +]; diff --git a/resources/lang/fa/notification.php b/resources/lang/fa/notification.php index d6e95b4..6a7fb83 100644 --- a/resources/lang/fa/notification.php +++ b/resources/lang/fa/notification.php @@ -18,7 +18,12 @@ return [ ], 'business_user' => [ - 'create' => 'کاربر :user به کسب و کار :business اضافه شد.' + 'create' =>[ + 'greeting' => 'سلام کاربر گرامی!', + 'subject' => 'افزودن کاربر به کسب و کار', + 'title' => 'افزودن کاربر به کسب و کار', + 'body' => 'کاربر :user به کسب و کار :business اضافه شد.' + ] ] ];