Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
composer.lock
phpunit.xml
vendor
11 changes: 11 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

$finder = PhpCsFixer\Finder::create()->in(__DIR__);

return PhpCsFixer\Config::create()
->setRules([
'array_syntax' => ['syntax' => 'short'],
'@PSR2' => true,
'@Symfony' => true,
])
->setFinder($finder);
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
CHANGE LOG
==========


## V4.0 (Mar 31, 2019)

* Require PHP 7.0 or higher
* Require intercom/intercom-php v4.x
* Update facade location => `Facades/Intercom.php`
* CS formating file added
* Update composer.json file
* Changed config location from `services.intercom` => `intercom`
* Added sample config file

## V3.2.0 (Sep 7, 2018)

* Upgraded to laravel 5.0
* Increased the minimum upstream version


## V3.1.8 (Aug 15, 2017)

* Increased the minimum upstream version
* Moved to the MIT license


## V1.1.4 (May 24, 2016)

* Increased the minimum upstream version
* Other minor tweaks


## V1.0 Alpha (May 24, 2016)

* Initial testing release
17 changes: 10 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@
"email": "alex@alexslaughter.com"
}],
"require": {
"intercom/intercom-php": "3.2.0",
"laravel/framework": ">=5.0"
"php": "^7.1",
"intercom/intercom-php": "^4.0",
"laravel/framework": ">=5.1"
},
"autoload": {
"psr-4": {
"Shadow\\IntercomLaravel\\": "src/"
}
},
"config": {
"preferred-install": "dist"
},
"extra": {
"laravel": {
"providers": [
"Shadow\\IntercomLaravel\\ServiceProvider"
],
"aliases": {
"Intercom": "Shadow\\IntercomLaravel\\Facade"
}
]
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
31 changes: 31 additions & 0 deletions config/intercom.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);
/*
* This file is part of Laravel Intercom.
*
* (c) Alex Slaughter <alex@alexslaughter.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [
/*
|--------------------------------------------------------------------------
| Application ID
|--------------------------------------------------------------------------
|
| Can be either an Application ID or a Token
| If you already have an access token you can find it [here](https://app.intercom.com/a/apps/_/developer-hub).
| If you want to create or learn more about access tokens then you can find more info [here](https://developers.intercom.com/building-apps/docs/authorization#section-access-tokens).
|
*/
'app_id' => 'main',
/*
|--------------------------------------------------------------------------
| Application Password
|--------------------------------------------------------------------------
|
*/
'api_key' => '',
];
2 changes: 1 addition & 1 deletion src/Facade.php → src/Facades/Intercom.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Shadow\IntercomLaravel;
namespace Shadow\IntercomLaravel\Facades;

use Illuminate\Support\Facades\Facade as IlluminateFacade;

Expand Down
1 change: 1 addition & 0 deletions src/IntercomLaravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class IntercomLaravel
{
private $intercom;

public function __construct($id, $key)
{
$this->intercom = new IntercomClient($id, $key);
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class ServiceProvider extends IlluminateServiceProvider
public function register()
{
$this->app->bind('intercom', function () {
$id = Config::get('services.intercom.app_id');
$key = Config::get('services.intercom.api_key');
$id = Config::get('intercom.app_id');
$key = Config::get('intercom.api_key');

return new IntercomLaravel($id, $key);
});
Expand Down