Skip to content

Commit

Permalink
Merge pull request #5 from ptondereau/master
Browse files Browse the repository at this point in the history
Fix compatibility issue with 5.1 + doc
  • Loading branch information
Lisennk authored Jun 6, 2017
2 parents ded833f + 048993b commit 1598f3c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: php

sudo: false
sudo: required
dist: trusty
group: edge

matrix:
include:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![License](https://poser.pugx.org/lisennk/laravel-slack-events-api/license)](https://packagist.org/packages/lisennk/laravel-slack-events-api)
[![Build Status](https://travis-ci.org/Lisennk/Slack-Events.svg?branch=1.0.0)](https://travis-ci.org/Lisennk/Slack-Events)

*Work with Slack Events API as easily as with native Laravel 5 events and event listeners.*
*Work with Slack Events API as easily as with native Laravel 5.1+ events and event listeners.*

**:link: Reasons to use this package for the [Slack Events API](https://api.slack.com/events-api):**
* Based on native Laravel Events
Expand Down Expand Up @@ -49,9 +49,9 @@ php artisan vendor:publish

<img src="https://cloud.githubusercontent.com/assets/8103985/17901937/ebdbdb3e-696d-11e6-96b4-b0794d74ed9a.png" alt="verification_token" style="height: 250px; width: auto;">

Open `config/slackEvents.php` and paste your Verification Token under the `'token'` key:
Open `.env` and paste your Verification Token under the `'SLACK_EVENT_TOKEN'` key:
```php
'token' => 'paste-your-token-here'
SLACK_EVENT_TOKEN=your-token
```

**6)** Now open the "Event Subscriptions" page. Here you must enable events, add events you wish to listen for and set **Request URL**. Request URL is the `'route'` key in your `config/slackEvents.php` file:
Expand All @@ -62,7 +62,7 @@ return [
| Your validation token from "App Credentials"
|-------------------------------------------------------------
*/
'token' => 'your-validation-token-here',
'token' => env('SLACK_EVENT_TOKEN', 'your-validation-token-here'),

/*
|-------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
<exclude>
<file>./src/Http/routes.php</file>
</exclude>
</whitelist>
</filter>
</phpunit>
2 changes: 1 addition & 1 deletion src/Events/Base/SlackEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SlackEvent
*/
public function setFromRequest(Request $request)
{
$this->setFromArray($request->toArray());
$this->setFromArray($request->all());
}

/**
Expand Down

0 comments on commit 1598f3c

Please sign in to comment.