/** * Send file push to device * * @param string $filePath * * @return bool */ public function sendFile($filePath) { if (!file_exists($filePath)) { return false; } try { $this->dataProvider->file('pushes', ['type' => 'file', 'device_id' => $this->getId(), 'file' => '@' . $filePath]); return true; } catch (\Exception $e) { echo $e; return false; } }