Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Laravel Package that makes Automatic Invitation to Slack Channels seamless

NotificationsYou must be signed in to change notification settings

goodnesskay/Laravel-Slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Latest Stable VersionLicenseScrutinizer Code QualityBuild Status

This package was built for easy integration of automatic Slack invite into your Laravel Project instead of writing codes from scratch or with another programming language.If your web project is built on Laravel and you need to handle Automatic Slack Invite, this package makes that job seamless. Enjoy!!!

Requirement

Installation

To install into your project, run the command below in your terminal.

composer require goodnesskay/laravel-slack

Once the package is done being installed, register the service provider. Openconfig/app.php and add the following to theproviders key.

GoodnessKay\LaravelSlack\LaravelSlackServiceProvider::class

After that, register the Facade in the sameconfig/app.php file:

'aliases' => [    ...       'LaravelSlack' => GoodnessKay\LaravelSlack\Facade\LaravelSlack::class,    ...]

Finally, this project requires GuzzleHttp Client. Install it by running this in your terminal

composer require guzzlehttp/guzzle

Configure

Publish the config fileLaravelSlack.php to config folder,theViews folder of the package namedSlack to theresources/views folder andLaravelSlackController.php toApp\Http\Controller folder

php artisan vendor:publish --provider="GoodnessKay\LaravelSlack\LaravelSlackServiceProvider"

How it Works

After following all the information stated above, what next to do are:

A) Copy the code below to your.env file and make changes to the values.

SLACK_TEAM_NAME="Codebag Team"TEAM_DESCRIPTION="Brief Description of your team. This will be seen publicly"SLACK_TEAM_URL="https://codebag-team-test.slack.com/"SLACK_API_TOKEN="apap-2526258373-71328384096-187220289412-01c2c6637bb0d474f39f24e0a79d6e072"SLACK_TEAM_EMAIL="gtkbrain@gmail.com"

Note: Make sure you include the quotation mark.

To get your Slack Api Token, checkhttps://api.slack.com/custom-integrations/legacy-tokens and go to Legacy Token Generator to issue the token.

B) Copy the code below into your route fileroutes/web.php

Route::get('/slack',[    'uses'=>'LaravelSlackController@slackPage',    'as'=>'slack']);Route::post('/slack',[    'uses'=>'LaravelSlackController@sendSlackInvite',    'as'=>'slack']);

C) Usephp artisan serve and check your slack invite page onhttp://locahost:8000/slack

You should see this:goodnesskay-laravel-slack-view

Contribute

You canfork this package,contribute andsubmit a pull request. I will really love it.

You want to appreciate me?

You can appreciate me bystarring this repository and follow me onGithub ,twitter and subscribe to myYoutube Channel!

I love you too.

Goodness Kayode | Pusher of Codes

License

MIT License (MIT).


[8]ページ先頭

©2009-2025 Movatter.jp