{"id":19765075,"url":"https://github.com/azhovan/push-notification-library","last_synced_at":"2025-05-07T13:06:56.893Z","repository":{"id":37532261,"uuid":"104575716","full_name":"Azhovan/push-notification-library","owner":"Azhovan","description":"Send push notification to Android and IOS devices with PHP","archived":true,"fork":false,"pushed_at":"2025-04-03T11:53:50.000Z","size":159,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T13:06:50.538Z","etag":null,"topics":["android","apns","autoload","fcm","ios","notification-library","notifications","php","server"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azhovan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-23T14:58:34.000Z","updated_at":"2025-04-03T11:53:59.000Z","dependencies_parsed_at":"2023-10-15T09:47:29.383Z","dependency_job_id":"2ae170b1-232a-4f74-8e5f-f8e33b961f5b","html_url":"https://github.com/Azhovan/push-notification-library","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":0.4285714285714286,"last_synced_commit":"00f5a9ef2fd778313c9224d921588a90af74a7d7"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azhovan%2Fpush-notification-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azhovan%2Fpush-notification-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azhovan%2Fpush-notification-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azhovan%2Fpush-notification-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azhovan","download_url":"https://codeload.github.com/Azhovan/push-notification-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252883204,"owners_count":21819160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","apns","autoload","fcm","ios","notification-library","notifications","php","server"],"created_at":"2024-11-12T04:16:34.851Z","updated_at":"2025-05-07T13:06:56.886Z","avatar_url":"https://github.com/Azhovan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":" \n\n\u003e **⚠️ This repository is archived and no longer maintained.**\n\u003e \n\u003e The code is provided as-is, without any guarantees of updates or support.\n\n \n\n# Push Notification Library for php\n \nStandalone PHP library for easy devices message notifications push.  \n\u003ci class=\"icon-flag\"\u003e\u003c/i\u003e \n**Feel free to contribute!**\n\n\n\nInstallation\n-------------\n\n    composer require push-notification/push-notification-php-library\n    composer dump-autoload -o \n\n\nThis repository uses PSR-0 autoload. After installation with composer please adjust you autoloading config if needed or include vendor/autoload.php in your index.php. \n\n **Requirements:**\n\n\u003e - PHP 5.6+\n\u003e - PHP Curl and OpenSSL modules\n\n  \u003e **available supports:**\n \u003e \n\u003e - APNS (Apple)\n\u003e - GCM (Android) and FCM (Android)\n\n### Setting\n1.  settings of your provider (Apn, Fcm) at  **.env**\n(make sure you renamed the .env.example to .env and filled all the requirements)\n\n\n2. path to .env file :\nyou need to set **$path** variable at ```src/PushNotification/Setting``` to the .env file\n\n\n### How to use : \n```php\ninclude_once \"vendor/autoload.php\";\n\nuse PushNotification\\Service\\PushService;\n\n$data = array(\n    'device' =\u003e array(\n        'name' =\u003e '', // Android or AppleIOS\n        'token' =\u003e '', // device token | user token , if you want to send to apple device you have to fill this \n        'id' =\u003e 'unique id here'),\n\n    'message' =\u003e array(\n        'action' =\u003e 'test',\n        'title' =\u003e 'this is test title',\n        'targets' =\u003e array(''), // if you want to use Fcm you can inclue array of targets \n        'body' =\u003e 'this is body',\n        'type' =\u003e '', // AndroidMessages or IOSMessages\n        'data' =\u003e array('type' =\u003e 'testType'))\n);\n\n$response  = PushService::getInstance()-\u003esend($data);\n\n```\n\n### Android :\n```php\ninclude_once \"vendor/autoload.php\";\n\nuse PushNotification\\Service\\PushService;\n\n$data = array(\n    'device' =\u003e array(\n        'name' =\u003e 'Android',  \n        'token' =\u003e '', \n        'id' =\u003e 'some id here '),\n\n    'message' =\u003e array(\n        'action' =\u003e 'test',\n        'title' =\u003e 'this is test title',\n        'targets' =\u003e array('token1', 'token2', 'token3'),\n        'body' =\u003e 'this is body',\n        'type' =\u003e 'AndroidMessages',  \n        'data' =\u003e array('type' =\u003e 'testType'))\n);\n$response  = PushService::getInstance()-\u003esend($data);\nprint_r($response);\n\n```\n\n\n### IOS :\n```php\ninclude_once \"vendor/autoload.php\";\n\nuse PushNotification\\Service\\PushService;\n\n$data = array(\n    'device' =\u003e array(\n        'name' =\u003e 'AppleIOS',\n        'token' =\u003e 'token',\n        'id' =\u003e 'BECDSx'),\n\n    'message' =\u003e array(\n        'action' =\u003e 'test',\n        'title' =\u003e 'this is test title',\n        'targets' =\u003e array(),\n        'body' =\u003e 'this is body',\n        'type' =\u003e 'IOSMessages', \n        'data' =\u003e array('type' =\u003e 'testType'))\n);\n$response  = PushService::getInstance()-\u003esend($data);\nprint_r($response);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazhovan%2Fpush-notification-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazhovan%2Fpush-notification-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazhovan%2Fpush-notification-library/lists"}