notifications ready fx11

This commit is contained in:
merdan 2022-11-23 12:26:34 +05:00
parent f9b22db99e
commit 85b33d6acc
1 changed files with 10 additions and 1 deletions

View File

@ -9,10 +9,14 @@ class Firebase
{
public $data;
public $priority;
public $notification;
public $to;
public function __construct(protected $to,$content,protected $priority = 'high')
public function __construct($to,$content,$priority = 'high')
{
$this->data = [
'click_action' => 'FLUTTER_NOTIFICATION_CLICK',
@ -25,6 +29,10 @@ class Firebase
'body' =>$content['content']
];
$this->to = $to;
$this->priority = $priority;
}
public function send(){
@ -43,6 +51,7 @@ class Firebase
Log::error($response);
$response->throw();
}
Log::info($response->body());
}
}