Download the PHP package gerinsp/firepush without Composer

On this page you can find all versions of the php package gerinsp/firepush. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package firepush

Firepush

A Laravel package for push notification to the FCM (Firebase Cloud Messaging)

Package ini telah di upload di Packagist, anda bisa mengeunjunginya pada link berikut: packagist.org

Cara Install

Konfigurasi

Setelah berhasil menginstall package tersebut, selanjutnya anda harus mendaftarkannya di service provider yang ada di direktori config/app.php

cara mendaftarkan service providers

Tambahkan baris kode tersebut ke dalam direktory config/app.php [providers]

contohnya

Setelah berhasil mendaftarkan service provider, selanjutnya publish file config

Pastikan di direktori config projek kalian terdapat file firepush.php. Lalu, setelah itu tambahkan server_key projek firebase kalian ke file .env

Cara Penggunaan

Setelah berhasil melakukan konfigurasi, selanjutnya kita tinggal import namespace dan panggil class nya.

Didalam method sendPush() tersebut terdapat 5 parameter, yaitu:

  1. regis_id, merupakan parameter yang digunakan untuk mengirim notifikasi ke spesifik user, regis_id ini berupa id perangkat yang diberikan oleh firebase nya.
  2. title, merupakan judul dari notifikasi yang akan kita kirim.
  3. body, merupakan isi pesan dari notifikasi yang akan dikirim.
  4. icon, merupakan icon yang akan muncul di notifikasi saat diterima di perangkat mobile nya. (optional)
  5. url, merupakan url browser yang digunakan untuk mengarahkan user ke alamat tertentu, ketika user klik notifikasinya. (optional)

Selain itu kita juga bisa menerima return response dari firebase nya untuk mengetahui apakah notifikasi nya terkirim atau tidak.

contohnya

Selanjutnya kita tinggal simpan saja responsenya.

contoh response sukses

Jika sukses, maka response "success" nya sama dengan true, dan terdapat "message_id" nya.

contoh response gagal

Namun, jika gagal maka response "success" nya false dan "failure" nya true. Harap diperhatikan juga jika response nya gagal maka kemungkinan regis_id nya sudah expired jadi, harap perbaharui regis_id nya secara berkala.

Lisensi

Projek ini ada di bawah lisensi MIT License.


All versions of firepush with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gerinsp/firepush contains the following files

Loading the files please wait ....