Browse Source

complete Fcm push notification

channel, message, notification
add fcm_token to Fingerprint model
pull/1/head
mahdihty 4 years ago
parent
commit
1d0231f6f3
  1. 5
      app/Notifications/MailNotification.php
  2. 18
      config/fcm.php
  3. 7
      resources/lang/fa/notification.php

5
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('/'));
}
/**

18
config/fcm.php

@ -0,0 +1,18 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| FCM API Key
|--------------------------------------------------------------------------
|
| This key allows you to send Push Notifications. To obtain this key go
| to the porject settings and click on the "Cloud Messaging" tab, now
| copy the API Key of "Legacy server key".
|
*/
'key' => env('FCM_KEY'),
];

7
resources/lang/fa/notification.php

@ -18,7 +18,12 @@ return [
],
'business_user' => [
'create' => 'کاربر :user به کسب و کار :business اضافه شد.'
'create' =>[
'greeting' => 'سلام کاربر گرامی!',
'subject' => 'افزودن کاربر به کسب و کار',
'title' => 'افزودن کاربر به کسب و کار',
'body' => 'کاربر :user به کسب و کار :business اضافه شد.'
]
]
];
Loading…
Cancel
Save