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

Fix for Laravel 5.5 #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,15 @@
"Maknz\\Slack\\Laravel\\": "src/"
}
},
"minimum-stability": "stable"
"minimum-stability": "stable",
"extra": {
"laravel": {
"providers": [
"Maknz\\Slack\\Laravel\\ServiceProvider"
],
"aliases": {
"Slack": "Maknz\\Slack\\Laravel\\Facade"
}
}
}
}
22 changes: 11 additions & 11 deletions src/ServiceProviderLaravel5.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Maknz\Slack\Laravel;

use Maknz\Slack\Client as Client;
use GuzzleHttp\Client as Guzzle;
use Maknz\Slack\Client as Client;

class ServiceProviderLaravel5 extends \Illuminate\Support\ServiceProvider
{
Expand All @@ -14,7 +14,7 @@ class ServiceProviderLaravel5 extends \Illuminate\Support\ServiceProvider
*/
public function boot()
{
$this->publishes([__DIR__.'/config/config.php' => config_path('slack.php')]);
$this->publishes([__DIR__ . '/config/config.php' => config_path('slack.php')]);
}

/**
Expand All @@ -24,19 +24,19 @@ public function boot()
*/
public function register()
{
$this->mergeConfigFrom(__DIR__.'/config/config.php', 'slack');
$this->mergeConfigFrom(__DIR__ . '/config/config.php', 'slack');

$this->app['maknz.slack'] = $this->app->share(function ($app) {
$this->app->singleton('maknz.slack', function ($app) {
return new Client(
$app['config']->get('slack.endpoint'),
[
'channel' => $app['config']->get('slack.channel'),
'username' => $app['config']->get('slack.username'),
'icon' => $app['config']->get('slack.icon'),
'link_names' => $app['config']->get('slack.link_names'),
'unfurl_links' => $app['config']->get('slack.unfurl_links'),
'unfurl_media' => $app['config']->get('slack.unfurl_media'),
'allow_markdown' => $app['config']->get('slack.allow_markdown'),
'channel' => $app['config']->get('slack.channel'),
'username' => $app['config']->get('slack.username'),
'icon' => $app['config']->get('slack.icon'),
'link_names' => $app['config']->get('slack.link_names'),
'unfurl_links' => $app['config']->get('slack.unfurl_links'),
'unfurl_media' => $app['config']->get('slack.unfurl_media'),
'allow_markdown' => $app['config']->get('slack.allow_markdown'),
'markdown_in_attachments' => $app['config']->get('slack.markdown_in_attachments'),
],
new Guzzle
Expand Down