Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isset for config('exponent-push-notifications') and set default empty array #128

Open
wants to merge 125 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
91e0f67
Initial Commit
Alymosul Jul 8, 2017
843efc2
Update composer.json
Alymosul Jul 8, 2017
912047f
Apply fixes from StyleCI
Alymosul Jul 8, 2017
057475f
Merge pull request #1 from Alymosul/analysis-8jojZr
Alymosul Jul 8, 2017
fb016cd
Update .travis.yml and remove unused variable from the ExpoChannel
Alymosul Jul 8, 2017
8306517
update README.md
Alymosul Jul 8, 2017
76817ad
update README.md
Alymosul Jul 8, 2017
97d7e0b
update README.md
Alymosul Jul 8, 2017
4a0e222
Update composer.json
Alymosul Jul 9, 2017
0450c75
Update README.md
Alymosul Jul 9, 2017
e5c4fa4
Update dependencies for Laravel 5.5
luklapp Nov 14, 2017
ec403c4
Update README for laravel <= 5.4
luklapp Nov 14, 2017
532468c
Merge pull request #2 from luklapp/master
Alymosul Nov 15, 2017
d845060
Update dependencies to support Laravel 5.6
Alymosul May 12, 2018
cc2f594
Fix StyleCI
Alymosul May 12, 2018
f937284
Add support to attach json data to the notification message.
Alymosul Jul 4, 2018
c6fb91d
Apply fixes from StyleCI
Alymosul Jul 4, 2018
ab00c9d
Merge pull request #5 from Alymosul/analysis-ze3dQa
Alymosul Jul 4, 2018
c19eeba
Fix json data property in toArray method in ExpoMessage
Alymosul Jul 4, 2018
504a7ec
Merge pull request #6 from Alymosul/addSupportToJsonData
Alymosul Jul 4, 2018
883fbf6
Accomodate to breaking change introduced in v27 for Android devices
Alymosul Jul 25, 2018
68fddd3
Fix Styling
Alymosul Jul 25, 2018
f617710
Return this from setChannelId()
Alymosul Jul 26, 2018
469c453
Apply fixes from StyleCI
Alymosul Jul 26, 2018
8d99288
Merge pull request #9 from Alymosul/analysis-q11WJ1
Alymosul Jul 26, 2018
566820f
Fix bug in default value for jsonData
Alymosul Jul 26, 2018
58e37d5
Merge branch 'master' of github.com:Alymosul/laravel-exponent-push-no…
Alymosul Jul 26, 2018
89c1c29
Apply fixes from StyleCI
Alymosul Jul 26, 2018
bad6622
Merge pull request #10 from Alymosul/analysis-87VAmE
Alymosul Jul 26, 2018
6a3687b
Implemented Package Discovery
patrickkivits Aug 27, 2018
1e65f11
Implemented database driver for storage of interests
patrickkivits Aug 27, 2018
879d93a
Allow for multiple values per key in database structure (e.q. multipl…
patrickkivits Aug 27, 2018
af23c8f
Return array of retrieved values to support multiple tokens per user
patrickkivits Aug 27, 2018
3beed52
Style CI changes: https://github.styleci.io/analyses/zGyEQ9
patrickkivits Aug 28, 2018
d3908b5
Style CI changes: https://github.styleci.io/analyses/zDpKgB
patrickkivits Aug 28, 2018
3a634d5
Added PHP DocBlocks
patrickkivits Aug 28, 2018
86cdbf7
Updated readme for package installation with older versions of Larave…
patrickkivits Aug 28, 2018
b4fb226
Retrieve function now only returns an array either empty or filled wi…
patrickkivits Aug 29, 2018
8989651
Cleanup driver determination in service provider
patrickkivits Aug 29, 2018
f1eb480
Style CI changes: https://github.styleci.io/analyses/XaOE7B
patrickkivits Aug 29, 2018
ebc3714
Added refactored test suite and tests for database driver
patrickkivits Sep 3, 2018
40cae8a
Apply fixes from StyleCI
patrickkivits Sep 3, 2018
7bbd3e0
Merge pull request #1 from patrickkivits/analysis-8n5GKG
patrickkivits Sep 3, 2018
8ba9172
Update ExpoChannel.php
patrickkivits Sep 5, 2018
591fb14
Apply fixes from StyleCI
patrickkivits Sep 5, 2018
6a1c5c7
Merge pull request #4 from patrickkivits/analysis-zYyy69
patrickkivits Sep 5, 2018
dd3d4e6
Allow for unsubscribing per token instead of purging all tokens per u…
patrickkivits Sep 5, 2018
898b3c8
Apply fixes from StyleCI
patrickkivits Sep 5, 2018
d1d2322
Merge pull request #5 from patrickkivits/analysis-zEyy1Z
patrickkivits Sep 5, 2018
e0f98e0
Fix tests with request parameter in request and added tests for singl…
patrickkivits Sep 5, 2018
4e82654
Add support to Laravel 5.7 and require expo-sdk v1.1.*
Alymosul Sep 27, 2018
e5c0757
Wording...
Alymosul Sep 27, 2018
1207210
Fix Risky tests.
Alymosul Sep 27, 2018
220ae38
[Refactoring] Publish the migration files only if we are using the da…
Alymosul Sep 27, 2018
bd8ec7e
Fix DocBlocks
Alymosul Sep 27, 2018
38db418
[Refactoring] Compare directly with the output of the delete() instea…
Alymosul Sep 27, 2018
62cd23a
[Refactoring] Removed ExpoDatabaseDriver and replaced it with a datap…
Alymosul Sep 27, 2018
5b32ef7
Merge branch 'patrickkivits-feature-database-driver'
Alymosul Sep 27, 2018
0a3bc4a
Apply fixes from StyleCI
Alymosul Sep 27, 2018
ba9dd51
Merge pull request #14 from Alymosul/analysis-zeGK6A
Alymosul Sep 27, 2018
0b10eca
Add Message title property
ddedic Dec 13, 2018
f3cdeb9
Bump
ddedic Dec 13, 2018
1a6ef9b
fix typo
ddedic Dec 13, 2018
86a7aec
style ci
ddedic Dec 13, 2018
ed04bdc
Merge pull request #17 from ddedic/message-title
Alymosul Jan 4, 2019
1147202
Update README.md
Julian367 Jan 15, 2019
72c6e17
Merge pull request #19 from iulian34/patch-1
Alymosul Jan 31, 2019
88e93d0
Added support for Laravel 5.8
jeanlucnguyen Apr 19, 2019
1402aee
Merge pull request #27 from jeanlucnguyen/master
Alymosul Apr 23, 2019
1d96aa9
Updated README.md
jonnycbw Jun 28, 2019
58f5d33
Added support for Laravel 6.0
pelmered Sep 6, 2019
2d614ea
Fix JSON formatting
pelmered Sep 6, 2019
a077f8b
Fix Laravel version constraints
pelmered Sep 6, 2019
2db8c14
Fix composer.json
pelmered Sep 11, 2019
6dc610d
Replace PHP 7.0 and 7.1 with 7.2 and 7.3 in Travis test matrix
pelmered Sep 16, 2019
a7e3d61
Use locally installed phpunit
pelmered Sep 16, 2019
8af7de9
Require PHP 7.1.3
pelmered Sep 16, 2019
b87e18e
Merge pull request #35 from pelmered/master
Alymosul Sep 18, 2019
6655d44
Apply fixes from StyleCI
Alymosul Sep 18, 2019
cb04c72
Merge pull request #39 from Alymosul/analysis-q2wBZ4
Alymosul Sep 18, 2019
ddcff60
Update README.md
Alymosul Sep 20, 2019
2579fea
Update composer.json
Alymosul Sep 20, 2019
c5e7cd2
Make channelId property optional
macr1408 Nov 28, 2019
f2a8095
Fix style
macr1408 Nov 29, 2019
c39097f
Merge pull request #45 from macr1408/master
Alymosul Dec 3, 2019
3fd130e
line break for jsonData and channelID examples
minimatrix Jan 2, 2020
e5d5398
Merge pull request #29 from jonnycbw/updatedREADME
Alymosul Jan 14, 2020
a54a982
Apply fixes from StyleCI
Alymosul Jan 14, 2020
be60275
Merge pull request #48 from Alymosul/analysis-EAPxGx
Alymosul Jan 14, 2020
833ba12
Debug option is now configurable.
enriconardo Mar 13, 2020
1c3537e
Composer json update
enriconardo Mar 13, 2020
4497f41
Update composer.json
hirbod Mar 20, 2020
e378701
Merge pull request #53 from Hirbod/patch-1
Alymosul Mar 21, 2020
ef173c2
Update composer.json
Mar 23, 2020
69f0527
Allow events to be configurable through config
samuelvisscher Jul 6, 2020
d5a8943
Add documentation
samuelvisscher Jul 6, 2020
7a69b73
Merge pull request #62 from samuelvisscher/feature/add-events
Alymosul Jul 7, 2020
35df551
Exponent debug is now true by default
Jul 8, 2020
081ee44
Merge pull request #52 from codificio/master
Alymosul Jul 8, 2020
3941afb
Update composer.json
mguariero Sep 8, 2020
edeb1e0
[Change]: Allow developers to change the notification priority parame…
abdullah-abunada Sep 9, 2020
9011099
[Change]: Allow to change the notification priority parameter as Expo…
abdullah-abunada Sep 9, 2020
352fd8c
Merge pull request #66 from source-ps/master
Alymosul Sep 27, 2020
ad1c051
Merge pull request #65 from mguariero/master
Alymosul Sep 27, 2020
9964d75
Allow middleware to be configurable through config
sebastiansson Dec 17, 2020
e200672
Only use config if defined
sebastiansson Dec 17, 2020
8e23396
Add fix incorrect use of config
sebastiansson Dec 17, 2020
87b24d4
Register middleware in container
sebastiansson Feb 3, 2021
c3a90dc
Add inject router
sebastiansson Feb 3, 2021
3a557f0
Update to support php 8
jindraregal Feb 1, 2021
94b30f7
Remove router dependency injection
sebastiansson Feb 8, 2021
32f5e1e
Change double quotes to single quotes
sebastiansson Feb 8, 2021
9db7858
Merge pull request #70 from aidergroup/master
Alymosul Feb 8, 2021
4634274
Apply fixes from StyleCI
Alymosul Feb 8, 2021
3caf5f3
Merge pull request #73 from Alymosul/analysis-nNGkLw
Alymosul Feb 8, 2021
bd95e3a
Update to support php 8 - address PR change requests
jindraregal Mar 11, 2021
a545cf4
Merge pull request #72 from regy42/patch-1
Alymosul Mar 11, 2021
8575879
Update exponent-server-sdk-php version
mediabc Jul 29, 2021
14201d9
Fix tests
mediabc Jul 29, 2021
d54d20b
Fix code style
mediabc Jul 29, 2021
dc6dec3
Merge pull request #74 from mediabc/patch-1
Alymosul Sep 9, 2021
cc76c48
Apply fixes from StyleCI
Alymosul Sep 9, 2021
10ed7ba
Merge pull request #76 from Alymosul/analysis-QM9NVZ
Alymosul Sep 9, 2021
65b1463
isset for config('exponent-push-notifications') and default empty array
udiptaweb Sep 12, 2021
99be521
isset for config('exponent-push-notifications') and set default empty…
udiptaweb Sep 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/.scrutinizer.yml export-ignore
/tests export-ignore
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/vendor
build
composer.phar
composer.lock
.idea
21 changes: 21 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
filter:
excluded_paths: [tests/*]

checks:
php:
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true

tools:
external_code_coverage: true
1 change: 1 addition & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
preset: laravel
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: php

php:
- 7.2
- 7.3

before_script:
- travis_retry composer self-update
- travis_retry composer update --no-interaction --prefer-source

script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

All notable changes to `exponent-push-notifications` will be documented in this file

## 1.0.0 - 2017-XX-XX

- initial release
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing

Contributions are **welcome** and will be fully **credited**.

Please read and understand the contribution guide before creating an issue or pull request.

## Etiquette

This project is open source, and as such, the maintainers give their free time to build and maintain the source code
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
extremely unfair for them to suffer abuse or anger for their hard work.

Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
world that developers are civilized and selfless people.

It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.

## Viability

When requesting or submitting new features, first consider whether it might be useful to others. Open
source projects are used by many developers, who may have entirely different needs to your own. Think about
whether or not your feature is likely to be used by other users of the project.

## Procedure

Before filing an issue:

- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.

Before submitting a pull request:

- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.

## Requirements

If the project maintainer has any additional requirements, you will find them listed here.

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.

**Happy coding**!
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The MIT License (MIT)

Copyright (c) Aly Suleiman <[email protected]>

> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
158 changes: 155 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,157 @@
# new-channels
# Exponent push notifications channel for Laravel

Discuss about new channel proposals our share your finished channels in the [proposal issue](https://github.com/laravel-notification-channels/new-channels/issues/6).
[![Latest Version on Packagist](https://img.shields.io/packagist/v/alymosul/laravel-exponent-push-notifications.svg?style=flat-square)](https://packagist.org/packages/alymosul/laravel-exponent-push-notifications)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://travis-ci.org/Alymosul/laravel-exponent-push-notifications.svg?branch=master)](https://travis-ci.org/Alymosul/laravel-exponent-push-notifications)
[![StyleCI](https://styleci.io/repos/96645200/shield?branch=master)](https://styleci.io/repos/96645200)
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/afe0ba9a-e35c-4759-a06f-14a081cf452c.svg?style=flat-square)](https://insight.sensiolabs.com/projects/afe0ba9a-e35c-4759-a06f-14a081cf452c)
[![Quality Score](https://img.shields.io/scrutinizer/g/alymosul/laravel-exponent-push-notifications.svg?style=flat-square)](https://scrutinizer-ci.com/g/alymosul/laravel-exponent-push-notifications)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/alymosul/laravel-exponent-push-notifications/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/alymosul/laravel-exponent-push-notifications/?branch=master)
[![Total Downloads](https://img.shields.io/packagist/dt/alymosul/laravel-exponent-push-notifications.svg?style=flat-square)](https://packagist.org/packages/alymosul/laravel-exponent-push-notifications)

Take a look at our [FAQ](http://laravel-notification-channels.com/) to see our small list of rules, to provide top-notch notification channels.
## Contents

- [Installation](#installation)
- [Usage](#usage) - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

## Installation

You can install the package via composer:

```bash
composer require alymosul/laravel-exponent-push-notifications
```

If you are using Laravel 5.5 or higher this package will automatically register itself using [Package Discovery](https://laravel.com/docs/5.5/packages#package-discovery). For older versions of Laravel you must install the service provider manually:

```php
// config/app.php
'providers' => [
...
NotificationChannels\ExpoPushNotifications\ExpoPushNotificationsServiceProvider::class,
],

```

Before publish exponent notification migration you must add in .env file:

```bash
EXPONENT_PUSH_NOTIFICATION_INTERESTS_STORAGE_DRIVER=database
```

You can publish the migration with:

```bash
php artisan vendor:publish --provider="NotificationChannels\ExpoPushNotifications\ExpoPushNotificationsServiceProvider" --tag="migrations"
```

After publishing the migration you can create the `exponent_push_notification_interests` table by running the migrations:

```bash
php artisan migrate
```

You can optionally publish the config file with:

```bash
php artisan vendor:publish --provider="NotificationChannels\ExpoPushNotifications\ExpoPushNotificationsServiceProvider" --tag="config"
```

This is the contents of the published config file:

```php
return [
'interests' => [
/*
* Supported: "file", "database"
*/
'driver' => env('EXPONENT_PUSH_NOTIFICATION_INTERESTS_STORAGE_DRIVER', 'file'),

'database' => [
'events' => [],

'table_name' => 'exponent_push_notification_interests',
],
]
];
```

## Usage

```php
use NotificationChannels\ExpoPushNotifications\ExpoChannel;
use NotificationChannels\ExpoPushNotifications\ExpoMessage;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
public function via($notifiable)
{
return [ExpoChannel::class];
}

public function toExpoPush($notifiable)
{
return ExpoMessage::create()
->badge(1)
->enableSound()
->title("Congratulations!")
->body("Your {$notifiable->service} account was approved!");
}
}
```

### Available Message methods

A list of all available options

- `title('')`: Accepts a string value for the title.
- `body('')`: Accepts a string value for the body.
- `enableSound()`: Enables the notification sound.
- `disableSound()`: Mutes the notification sound.
- `badge(1)`: Accepts an integer value for the badge.
- `ttl(60)`: Accepts an integer value for the time to live.
- `jsonData('')`: Accepts a json string or an array for additional.
- `channelID('')`: Accepts a string to set the channelId of the notification for Android devices.
- `priority('default')`: Accepts a string to set the priority of the notification, must be one of [default, normal, high].

### Managing Recipients

This package registers two endpoints that handle the subscription of recipients, the endpoints are defined in src/Http/routes.php file, used by ExpoController and all loaded through the package service provider.

### Routing a message

By default the exponent "interest" messages will be sent to will be defined using the {notifiable}.{id} convention, for example `App.User.1`, however you can change this behaviour by including a `routeNotificationForExpoPushNotifications()` in the notifiable class method that returns the interest name.

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing

```bash
$ composer test
```

## Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Credits

- [Aly Suleiman](https://github.com/Alymosul)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
46 changes: 46 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "alymosul/laravel-exponent-push-notifications",
"description": "Exponent push notifications driver for laravel",
"homepage": "https://github.com/alymosul/laravel-exponent-push-notifications",
"license": "MIT",
"authors": [
{
"name": "Aly Suleiman",
"email": "[email protected]",
"role": "Developer"
}
],
"require": {
"php": "^7.1.3|^8.0",
"alymosul/exponent-server-sdk-php": "1.3.*",
"laravel/framework": "^5.6 | ^6.0 | ^7.0 | ^8.0"
},
"require-dev": {
"mockery/mockery": "^0.9.5||^1.0",
"phpunit/phpunit": "~5.4||~5.7||~6.0||^7.0||^8.0||^9.0",
"orchestra/testbench": "~3.3||~4.0||^6.0"
},
"autoload": {
"psr-4": {
"NotificationChannels\\ExpoPushNotifications\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"NotificationChannels\\ExpoPushNotifications\\Test\\": "tests"
}
},
"scripts": {
"test": "vendor/bin/phpunit"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"NotificationChannels\\ExpoPushNotifications\\ExpoPushNotificationsServiceProvider"
]
}
}
}
26 changes: 26 additions & 0 deletions config/exponent-push-notifications.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/**
* Here you may define the configuration for the expo-notifications-driver.
* The expo-notifications-driver can guide the sdk to use `database` or `file` repositories.
* The database repository uses the same configuration for the database in your Laravel app.
*/

return [
'middleware' => [
//'auth:sanctum', //<- Use only this middleware if you're using Sanctum
'auth:api',
'bindings',
],
'debug' => env('EXPONENT_PUSH_NOTIFICATION_DEBUG', true),

'interests' => [
'driver' => env('EXPONENT_PUSH_NOTIFICATION_INTERESTS_STORAGE_DRIVER', 'file'),

'database' => [
'events' => [],

'table_name' => 'exponent_push_notification_interests',
],
],
];
Loading