-
Notifications
You must be signed in to change notification settings - Fork 115
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
Remove share method #9
base: master
Are you sure you want to change the base?
Conversation
The share method has been remove in Laravel 5.4 and the singleton method should be used instead.
Remove share method
This PR fixed the following error I got after updating to 5.4
|
That solves the undefined method but I found it didn't actually work with just that change, this is what I did to get it working: Note the public function register()
{
$this->mergeConfigFrom(__DIR__.'/config/config.php', 'slack');
$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'),
'markdown_in_attachments' => $app['config']->get('slack.markdown_in_attachments'),
],
new Guzzle
);
});
$this->app->bind(Maknz\Slack\Client::class, 'maknz.slack');
} |
@connorjburton This is the right approach. |
@connorjburton Willing to make pull request? @maknz Willing to merge? |
See #11 |
I think this repo is dead and should be transferred to organization or person who will maintain it. @maknz |
I just made a fork and fixed it there: if anybody is interested: https://github.com/phpify/slack-laravel or just |
No description provided.