PHPackages                             hopkins/slack-against-humanity - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hopkins/slack-against-humanity

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hopkins/slack-against-humanity
==============================

A slack webhook integration that lets your team play cards against humanity

7217310[3 issues](https://github.com/michael-hopkins/SlackAgainstHumanity/issues)PHP

Since Dec 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/michael-hopkins/SlackAgainstHumanity)[ Packagist](https://packagist.org/packages/hopkins/slack-against-humanity)[ RSS](/packages/hopkins-slack-against-humanity/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Slack Against Humanity (A Laravel Package) v0.5
-----------------------------------------------

[](#slack-against-humanity-a-laravel-package-v05)

[![](https://camo.githubusercontent.com/f03c2a191cccdf8da16353e98120edc8ca4e98d29c0110f45827996413e8b1c6/687474703a2f2f692e696d6775722e636f6d2f6a5330683034382e706e67)](https://camo.githubusercontent.com/f03c2a191cccdf8da16353e98120edc8ca4e98d29c0110f45827996413e8b1c6/687474703a2f2f692e696d6775722e636f6d2f6a5330683034382e706e67)

Slack Against Humanity is a Slack/Hubot implementation of the popular card game, [Cards Against Humanity](http://cardsagainsthumanity.com). Commands are issued in your slack channel via [Custom Slash Commands](https://api.slack.com/slash-commands), Github's [Hubot](https://github.com/github/hubot), or a combination of both and then passed to this package. Cards will be dealt, Judges are picked at random, and who plays what card is kept secret until the end (if they win!).

---

- This is **Cards Against Humanity**. If you have sensibilities that are easily offended, this game is NOT FOR YOU.
- All commands are issued via GET and POST requests against a web API
- **763** included cards!
- 103 **Black Cards**
- 660 **White Cards**
- A randomly picked Judge each round
- Ability to enter and exit play **on your time**
- Laravel **5.x** compatibility
- Intelligence on who is actually playing or not
- with many more features in the works.

---

[![Latest Stable Version](https://camo.githubusercontent.com/4f4b15e7443f70d817827d23e21b2d2af1d54662997f296191c401c092a7db2c/68747470733a2f2f706f7365722e707567782e6f72672f686f706b696e732f736c61636b2d616761696e73742d68756d616e6974792f76657273696f6e2e737667)](https://packagist.org/packages/hopkins/slack-against-humanity)[![Total Downloads](https://camo.githubusercontent.com/fc8efd47796fed6eb64eaa817ee9d29dae790736bd3fa61ac94463ebbf9a6d66/68747470733a2f2f706f7365722e707567782e6f72672f686f706b696e732f736c61636b2d616761696e73742d68756d616e6974792f646f776e6c6f6164732e737667)](https://packagist.org/packages/hopkins/slack-against-humanity)[![Latest Unstable Version](https://camo.githubusercontent.com/a287a47ff7ba64fc08f1f54588e9ee5228711b839d629819017cbb22be665970/68747470733a2f2f706f7365722e707567782e6f72672f686f706b696e732f736c61636b2d616761696e73742d68756d616e6974792f762f756e737461626c652e737667)](//packagist.org/packages/hopkins/slack-against-humanity)[![License](https://camo.githubusercontent.com/955fe3275e00d8d82189358b90b9b08ac0dcaee9c146f717b80d22ed2d830e2e/68747470733a2f2f706f7365722e707567782e6f72672f686f706b696e732f736c61636b2d616761696e73742d68756d616e6974792f6c6963656e73652e737667)](https://packagist.org/packages/hopkins/slack-against-humanity)[![SensioLabsInsight](https://camo.githubusercontent.com/dcc8f4052db01b35c354306c2fca0294559cf507b7b88e4f63d88c9d2cefa991/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37663261643833632d333038622d343563642d626661392d6165653333393965623762632f6d696e692e706e67)](https://insight.sensiolabs.com/projects/7f2ad83c-308b-45cd-bfa9-aee3399eb7bc)[![ghit.me](https://camo.githubusercontent.com/5dc05514467bdc1a3d688fdb463e5e21f00b46f1ce1ec5ebbcfcaca4ae2096de/68747470733a2f2f676869742e6d652f62616467652e7376673f7265706f3d6d69636861656c6a686f706b696e732f736c61636b616761696e737468756d616e697479)](https://ghit.me/repo/michaeljhopkins/slackagainsthumanity)

Anybody that wants to play needs to be dealt in. A check happens on every deal, and every new round that 3 people are playing. CAH with 2 people is kinda boring. Don't like your cards? Too bad, no cheating here.

[![](https://camo.githubusercontent.com/7f4cf1411bf28c92f475266418ed80f060677a6018dcc837ddb45ba4ba3f2551/687474703a2f2f692e696d6775722e636f6d2f6c6d484e4c444a2e706e67)](https://camo.githubusercontent.com/7f4cf1411bf28c92f475266418ed80f060677a6018dcc837ddb45ba4ba3f2551/687474703a2f2f692e696d6775722e636f6d2f6c6d484e4c444a2e706e67)

Once there have been dealt in, a Judge is chosen at random, and a Black card is chosen at random. Everybody except the Judge needs to play a white card from their hand.

[![](https://camo.githubusercontent.com/ec0e998929bc5e3cdf3f4c4cef69a2207f33132620afc4e3c9fff8fb57574a42/687474703a2f2f692e696d6775722e636f6d2f4162675564494f2e706e67)](https://camo.githubusercontent.com/ec0e998929bc5e3cdf3f4c4cef69a2207f33132620afc4e3c9fff8fb57574a42/687474703a2f2f692e696d6775722e636f6d2f4162675564494f2e706e67)

After each player plays a card a check happens to see if everybody who can play, did play. If they did, it's time to pick a winner! Only the Judge is allowed to choose the winner.

[![](https://camo.githubusercontent.com/4cf3fce81f47e7521de272000dc91fc1e11b0a4134a4ac1cf0af05842e69a717/687474703a2f2f692e696d6775722e636f6d2f45423430454b582e706e67)](https://camo.githubusercontent.com/4cf3fce81f47e7521de272000dc91fc1e11b0a4134a4ac1cf0af05842e69a717/687474703a2f2f692e696d6775722e636f6d2f45423430454b582e706e67)

Everybody who played a card is then dealt a new card. And it starts all over again.

[![](https://camo.githubusercontent.com/085d2e75034e6e3c03dec8d475e6f7ba05a435f2c58b29437d40382b7f67d3f0/687474703a2f2f692e696d6775722e636f6d2f38734577436f692e706e67)](https://camo.githubusercontent.com/085d2e75034e6e3c03dec8d475e6f7ba05a435f2c58b29437d40382b7f67d3f0/687474703a2f2f692e696d6775722e636f6d2f38734577436f692e706e67)

---

\#Installation

In it's current state, this package expects that you have set up [**Maknz/Slack**](https://github.com/maknz/slack) on your own. This includes setting up the facade `Slack::` as well as set up a **\#cards** channel in Slack.

Require this package in your `composer.json` and update composer.

```
"hopkins/slack-against-humanity": "~0.5"
```

After updating composer, add the ServiceProvider to the providers array in `app/config/app.php`

```
'Hopkins\SlackAgainstHumanity\Providers\SahServiceProvider',
```

Run the artisan command to bring the migrations and see files into your source db

```
php artisan vendor:publish
```

Make a new **CardsController** that extends the controller in the package

```
