laravel-slack - уведомления в slack из laravel
\Slack::to('#finance')->send('Hey, finance channel! A new order was created just now!');
https://github.com/gpressutto5/laravel-slack
\Slack::to('#finance')->send('Hey, finance channel! A new order was created just now!');
<?php
require_once __DIR__.'/vendor/autoload.php';
$keyfile = __DIR__.'/keyfile';
$envFile = __DIR__.'/.env';
$d = new \Psecio\SecureDotenv\Parser($keyfile, $envFile);
// The contents here is the set of all decrypted values fron the .env
print_r($d->getContent());
?>
<?php
use xobotyi\beansclient\BeansClient;
use xobotyi\beansclient\Connection;
$connection = new Connection('127.0.0.1', 11300, 2, true);
$beansClient = new BeansClient($connection);
## ##
# PRODUCER #
## ##
$beansClient->useTube('myAwesomeTube')
->put("job's payload");
## ##
# WORKER #
## ##
$job = $beansClient->watchTube('myAwesomeTube')
->reserve();
if ($job->id) {
echo "Hey, i received first {$job->payload} of job with id {$job->id}\n";
$job->delete();
echo "And i've done it!\n";
}
else {
echo "So sad, i have nothing to do";
}
echo "Am I still connected? \n" . ($beansClient->getConnection()->isActive() ? 'Yes' : 'No') . "\n";
Категории:
Оставить на заметку в: