Skip to content

javfres/slack-laravel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack for Laravel

This package provides slack support for laravel. It is similar to Slack Laravel but instead of using the deprecated library Slack for PHP 1, it uses Slack for PHP 2. A new developer is leading the project in a different repository.

  • Note 2020: Support for Laravel 6

Install

Composer stuff

Require this package using the git repository. I have not published it into packagist.

"require": {
    
    ...
    "javfres/slack-laravel": "^3.0.0",

},

...

"repositories": [
    {
        "type": "git",
        "url": "https://github.com/javfres/laravel-jslang"
    }
]

Webhook

Then create an incoming webhook for each the Slack team you'd like to send messages to.

Laravel

Add the Javfres\Slack\ServiceProvider provider to the providers array in config/app.php:

'providers' => [
    Javfres\Slack\ServiceProvider::class,
],

Then add the facade to your aliases array:

'aliases' => [
    ...
    'Slack' => Javfres\Slack\Facades\Slack::class,
],

Finally, publish the config file with php artisan vendor:publish. You will find it at config/slack.php.

Configuration

The config file comes with defaults and placeholders. Configure at least one team and any defaults you'd like to change.

Extra

Config for using this directly from a folder instead from github for debug.

"require": {
    
    ...
    "javfres/slack-laravel": "@dev",

},

...

"repositories": [
    {
        "type": "path",
        "url": ".../0_repos/slack-laravel"
    }
]

About

Laravel integration for the nexylan/slack package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%