maknz / slack-laravel Goto Github PK
View Code? Open in Web Editor NEWLaravel integration for the maknz/slack package
License: BSD 2-Clause "Simplified" License
Laravel integration for the maknz/slack package
License: BSD 2-Clause "Simplified" License
Hi,
When I tried to send a message with Laravel 4.2, I got this error "parse_url() expects parameter 1 to be string, array given".
Stack trace:
Stack trace:
0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'parse_url() exp...', '/Users/ipol2n/h...', 51, Array)
1 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/psr7/src/Uri.php(51): parse_url(Array)
2 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/guzzle/src/Client.php(142): GuzzleHttp\Psr7\Uri->__construct(Array)
3 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/guzzle/src/Client.php(115): GuzzleHttp\Client->buildUri(Array, Array)
4 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/guzzle/src/Client.php(129): GuzzleHttp\Client->requestAsync('post', Array, Array)
5 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/guzzle/src/Client.php(87): GuzzleHttp\Client->request('post', Array, Array)
6 /Users/ipol2n/html/warroom-cbc/vendor/maknz/slack/src/Client.php(358): GuzzleHttp\Client->__call('post', Array)
7 /Users/ipol2n/html/warroom-cbc/vendor/maknz/slack/src/Client.php(358): GuzzleHttp\Client->post(Array, Array)
8 /Users/ipol2n/html/warroom-cbc/vendor/maknz/slack/src/Message.php(410): Maknz\Slack\Client->sendMessage(Object(Maknz\Slack\Message))
9 [internal function]: Maknz\Slack\Message->send('test')
10 /Users/ipol2n/html/warroom-cbc/vendor/maknz/slack/src/Client.php(124): call_user_func_array(Array, Array)
11 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Maknz\Slack\Client->__call('send', Array)
12 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Maknz\Slack\Client->send('test')
13 /Users/ipol2n/html/warroom-cbc/app/routes.php(210): Illuminate\Support\Facades\Facade::__callStatic('send', Array)
14 /Users/ipol2n/html/warroom-cbc/app/routes.php(210): Maknz\Slack\Laravel\Facade::send('test')
15 [internal function]: {closure}()
16 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)
17 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1033): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
18 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
19 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
20 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
21 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
22 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
23 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
24 /Users/ipol2n/html/warroom-cbc/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
25 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
26 /Users/ipol2n/html/warroom-cbc/public/index.php(49): Illuminate\Foundation\Application->run()
27 {main} [] []
I tried to debug and found that some config of this package are missing.
I dump $app['config'] and found only these config.
'slack::allow_markdown' => array (size=0) empty 'slack::markdown_in_attachments' => array (size=0) empty 'slack::unfurl_media' => array (size=0) empty
Could you please help?
Thank you
Hi, I'm getting this error:
cURL error 3: <url> malformed
#0 /home/edwin/Documents/laravel/vendor/guzzlehttp/guzzle/src/RequestFsm.php(104): GuzzleHttp\Exception\RequestException::wrapException(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Ring\Exception\RingException))
#1 /home/edwin/Documents/laravel/vendor/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#2 /home/edwin/Documents/laravel/vendor/react/promise/src/FulfilledPromise.php(25): GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(Array)
#3 /home/edwin/Documents/laravel/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
#4 /home/edwin/Documents/laravel/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
#5 /home/edwin/Documents/laravel/vendor/guzzlehttp/guzzle/src/RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
#6 /home/edwin/Documents/laravel/vendor/guzzlehttp/guzzle/src/Client.php(165): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#7 /home/edwin/Documents/laravel/vendor/guzzlehttp/guzzle/src/Client.php(150): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
#8 /home/edwin/Documents/laravel/vendor/maknz/slack/src/Client.php(357): GuzzleHttp\Client->post(Array, Array)
#9 /home/edwin/Documents/laravel/vendor/maknz/slack/src/Message.php(410): Maknz\Slack\Client->sendMessage(Object(Maknz\Slack\Message))
I get this error after running
Slack::to('#jarvis-testing')->send('testing');
I've set the endpoint
field in /config/packages/maknz/slack/config.php
, while the rest of the fields are default.
Interestingly, the other package (https://github.com/maknz/slack) works fine.
I'm running on laravel 4.2
Thanks for this package! Just what I needed.
One little issue I ran into was that while trying to publish the config file, I tried running vendor:publish --provider="Maknz\Slack\Laravel\ServiceProvider"
to no avail. However, using vendor:publish --provider="Maknz\Slack\Laravel\ServiceProviderLaravel5"
worked just fine. Don't know if this is something that can be fixed or just needs documenting.
laravel6
Does it support api calls using oAuth Bot Token?
Since each team in slack generates different incoming webhook for each app, is there a way this package can manage to change the endpoint for different users? I see that on Slack for PHP it's possible, but here you have just one preconfigured endpoint in the config/slack.php file.
Am I getting something wrong?
Thank you!
Upgrading to Laravel 5.5 breaks current functionality because share has been deprecated.
Call to undefined method October\Rain\Foundation\Application::share()
Is there a planned fix for this?
Installed the package on Laravel 5.4 and got the following error below:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Foundation\Application::share()
Are you going to add a fix for the new framework?
I am running Laravel 5.2
In the README.md there is a line stating to get the base config file over to config/slack.php
you must run php artisan config:publish maknz/slack
however this produces the following error:
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "config:publish" is not defined.
Did you mean one of these?
vendor:publish
config:cache
config:clear
this package is using 1.7.0 which does not have actions implemented can you update this package to the latest version so that we can use actions too,
I am having this error in my console commands. Everything works fine in controllers though. What could be the cause?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.