Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Yournotify Laravel

Official Laravel package for the current Yournotify API.

Installation

composer require yournotify/yournotify-laravel

Configuration

Set these environment variables:

YOURNOTIFY_API_KEY=your_api_key
YOURNOTIFY_API_URL=https://api.yournotify.com/

Publish config if needed:

php artisan vendor:publish --tag=yournotify-config

Usage

use Yournotify;

Yournotify::sendEmail(
    'Welcome Campaign',
    'Welcome',
    '<p>Hello</p>',
    'Hello',
    'draft',
    'noreply@smtp.yournotify.net',
    [['email' => 'person@example.com', 'name' => 'Person']]
);

Yournotify::sendWhatsApp([
    'name' => 'WhatsApp campaign',
    'template_id' => 'template_123',
]);

Yournotify::createReward(['name' => 'Referral reward']);
Yournotify::track(['event' => 'checkout.completed', 'external_id' => 'user_123']);

Supported methods

  • sendEmail(...)
  • sendSMS(...)
  • sendWhatsApp(...)
  • sendPush(...)
  • sendInApp(...)
  • testCampaign(...)
  • addContact(...)
  • getContact(...)
  • getContacts(...)
  • updateContact(...)
  • deleteContact(...)
  • addList(...)
  • getList(...)
  • getLists(...)
  • updateList(...)
  • deleteList(...)
  • getCampaign(...)
  • getCampaigns(...)
  • updateCampaign(...)
  • deleteCampaign(...)
  • getCampaignStats(...)
  • getCampaignReports(...)
  • getRewards(...)
  • createReward(...)
  • sendReward(...)
  • getRewardProducts(...)
  • getRewardAnalytics(...)
  • getRewardSubmissions(...)
  • identify(...)
  • track(...)
  • getProfile()

Failed API responses throw RuntimeException with the Yournotify response message when available.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages