PHP code example of vientodigital / laravel-expo-push-notifications

1. Go to this page and download the library: Download vientodigital/laravel-expo-push-notifications library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vientodigital / laravel-expo-push-notifications example snippets


Laravel 5.5+
PHP 7+

use VientoDigital\LaravelExpoPushNotifications\Channels\ExpoPushNotificationChannel;
use VientoDigital\LaravelExpoPushNotifications\Messages\ExpoPushNotificationMessage;

    public function via($notifiable)
    {
        return ['mail', 'database', ExpoPushNotificationChannel::class];
    }

    public function toExpo($notifiable)
    {
        return (new ExpoPushNotificationMessage)
            ->title("Push Notification Title")
            ->body("Lorem ipsum....");
    }