PHP code example of samlittler / laravel-vero

1. Go to this page and download the library: Download samlittler/laravel-vero 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/ */

    

samlittler / laravel-vero example snippets


return [
    ...
    'vero' => [
        'auth_token' => env('VERO_AUTH_TOKEN'),
    ],
];

VERO_AUTH_TOKEN="your auth token here"

$vero  = new \SamLittler\Vero('<your_auth_token>');

$user = Vero::users()->findOrCreate(123);
$user->identify();

$user = Vero::users()->findOrCreate(123);
$user->setEmail('[email protected]');
$user->identify([
    'forename' => 'John',
    'surname' => 'Smith',
]);

$user = Vero::users()->findOrCreate(123);
$user->addChannel('push', '<apns_or_fcm_token>', 'ios');
$user->identify();

$user = Vero::users()->findOrCreate(123);
$user->unsubscribe();

$user = Vero::users()->findOrCreate(123);
$user->unsubscribe();

$user = Vero::users()->findOrCreate(123);
$user->delete();

$user = Vero::users()->findOrCreate(123);
$user->addTag('november');

$user = Vero::users()->findOrCreate(123);
$user->removeTag('november');

$user = Vero::users()->findOrCreate(123);
$user->track('User Registered', [
    'referral' => 'app_store',
]);