PHP code example of netcore / galerts

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

    

netcore / galerts example snippets


    'providers' => [
        ...
        Netcore\GAlerts\GAlertsServiceProvider::class,
    ]

    use Netcore\GAlerts\GAlert;

    GAlert::all();

    GAlert::findByDataId('28764d5015595ee0:60bb6f517d7861db:com:en:US:L');

    GAlert::findByKeyword('My alert');

    $alert = new GAlert;
    
    $alert = $alert
        ->keyword('My alert')
        ->deliverToEmail()
        ->frequencyWeekly()
        ->language('lv')
        ->save();

    $alert = GAlert::findByKeyword('My alert');
   
    $updated = $alert
        ->keyword('My new alert')
        ->deliverToFeed()
        ->update();

    $alert = GAlert::findByKeyowrd('My alert');
   
    $alert->delete();