https://github.com/netcore/galerts
PHP Laravel driven application for handling Google Alerts
https://github.com/netcore/galerts
Last synced: 5 months ago
JSON representation
PHP Laravel driven application for handling Google Alerts
- Host: GitHub
- URL: https://github.com/netcore/galerts
- Owner: netcore
- License: mit
- Created: 2017-03-03T17:39:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-10T13:27:08.000Z (almost 9 years ago)
- Last Synced: 2025-07-18T03:58:03.582Z (11 months ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 4
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Alerts manager
### Installation
1. Install package using command
```bash
composer require netcore/galerts
```
2. Add service provider to your app.php file
```php
'providers' => [
...
Netcore\GAlerts\GAlertsServiceProvider::class,
]
```
### Usage
At the top of your controller/service put the following
```php
use Netcore\GAlerts\GAlert;
```
- Fetch all existing alerts
```php
GAlert::all();
```
- Find alert by data id
```php
GAlert::findByDataId('28764d5015595ee0:60bb6f517d7861db:com:en:US:L');
```
- Find alert by data id
```php
GAlert::findByKeyword('My alert');
```
- Create an alert
```php
$alert = new GAlert;
$alert = $alert
->keyword('My alert')
->deliverToEmail()
->frequencyWeekly()
->language('lv')
->save();
```
- Update an existing alert
```php
$alert = GAlert::findByKeyword('My alert');
$updated = $alert
->keyword('My new alert')
->deliverToFeed()
->update();
```
- Delete an alert
```php
$alert = GAlert::findByKeyowrd('My alert');
$alert->delete();
```