notifications ready fx11
This commit is contained in:
parent
f9b22db99e
commit
85b33d6acc
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue