36 lines
696 B
PHP
36 lines
696 B
PHP
<?php
|
|
|
|
class Application_Model_FcmFirebase extends App_Model_FcmFirebase
|
|
{
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
public function sendNotificaOrdine($dati, $token)
|
|
{
|
|
|
|
$corpoNotifica = array(
|
|
'notification' => array(
|
|
'title' => $dati['Title'],
|
|
'body' => $dati['Message'],
|
|
'sound' => 'default',
|
|
//'badge' => '1'
|
|
),
|
|
'to' => $token
|
|
);
|
|
|
|
if($dati){
|
|
$corpoNotifica['data'] = array(
|
|
'action' => '',
|
|
'url' => ''
|
|
);
|
|
}
|
|
|
|
$this->postCall($corpoNotifica);
|
|
}
|
|
|
|
|
|
}
|