Download the PHP package codprox/laravel-onesignal without Composer

On this page you can find all versions of the php package codprox/laravel-onesignal. 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 laravel-onesignal

Laravel-OneSignal

Package Laravel optimisé pour interconnecter votre backend avec OneSignal, permettant l'envoi de notifications push, la gestion de segments, et l'inscription d'utilisateurs de manière simple et performante.

Latest Version on Packagist Total Downloads License

Prérequis

Installation

Installez le package via Composer :

Publiez le fichier de configuration (Cela créera un fichier config/onesignal.php dans votre projet) : php artisan vendor:publish --tag=onesignal-config

Le fichier config/onesignal.php contient les options par défaut : return [ 'app_id' => env('ONESIGNAL_APP_ID'), 'rest_api_key' => env('ONESIGNAL_REST_API_KEY'), 'default_icon' => env('ONESIGNAL_DEFAULT_ICON', 'https://example.com/icon.png'), 'cache_ttl' => env('ONESIGNAL_CACHE_TTL', 3600), // Durée en secondes 'timeout' => env('ONESIGNAL_TIMEOUT', 10.0), // Timeout HTTP en secondes 'connect_timeout' => env('ONESIGNAL_CONNECT_TIMEOUT', 5.0), // Timeout de connexion ];

Utilisation

```Le package fournit une classe MyOneSignal accessible via une façade ou par injection de dépendance.

*** Via la Façade

use Codprox\OneSignal\Facades\OneSignal; OneSignal::sendToAll(['Subject', 'Body'], ['badge_count' => 1]);

*** Via Injection de Dépendance

use Codprox\OneSignal\MyOneSignal; class NotificationController extends Controller { protected MyOneSignal $oneSignal;

public function __construct(MyOneSignal $oneSignal)
{
    $this->oneSignal = $oneSignal;
}

public function send()
{
    $this->oneSignal->sendToAll(['Test', 'Hello World']);
}

}

Méthodes Disponibles

  1. sendToAll(array $message, array $extraData = [], ?string $scheduledTime = null): array


All versions of laravel-onesignal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.8
illuminate/support Version ^11.0
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 codprox/laravel-onesignal contains the following files

Loading the files please wait ...