{"id":14974801,"url":"https://github.com/wgmv/laravel-slack-api","last_synced_at":"2025-10-27T09:31:39.498Z","repository":{"id":57080173,"uuid":"102903970","full_name":"wgmv/laravel-slack-api","owner":"wgmv","description":"Laravel Wrapper for Slack.com Web API: https://api.slack.com","archived":false,"fork":false,"pushed_at":"2019-11-02T20:54:38.000Z","size":1773,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T05:01:34.272Z","etag":null,"topics":["laravel5","laravel6","slack"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wgmv.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-08T20:59:13.000Z","updated_at":"2021-07-09T09:45:01.000Z","dependencies_parsed_at":"2022-08-24T14:42:33.431Z","dependency_job_id":null,"html_url":"https://github.com/wgmv/laravel-slack-api","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wgmv%2Flaravel-slack-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wgmv%2Flaravel-slack-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wgmv%2Flaravel-slack-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wgmv%2Flaravel-slack-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wgmv","download_url":"https://codeload.github.com/wgmv/laravel-slack-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238472041,"owners_count":19478149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel5","laravel6","slack"],"created_at":"2024-09-24T13:51:06.086Z","updated_at":"2025-10-27T09:31:34.180Z","avatar_url":"https://github.com/wgmv.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Laravel 5 and Lumen - Slack API\n\n[![Latest Stable Version](https://poser.pugx.org/wgmv/laravel-slack-api/version)](https://packagist.org/packages/wgmv/laravel-slack-api)\n[![Total Downloads](https://poser.pugx.org/wgmv/laravel-slack-api/downloads)](https://packagist.org/packages/wgmv/laravel-slack-api)\n[![Latest Unstable Version](https://poser.pugx.org/wgmv/laravel-slack-api/v/unstable)](//packagist.org/packages/wgmv/laravel-slack-api)\n[![License](https://poser.pugx.org/wgmv/laravel-slack-api/license)](https://packagist.org/packages/wgmv/laravel-slack-api)\n\n[![StyleCI](https://styleci.io/repos/102903970/shield?branch=master)](https://styleci.io/repos/102903970)\n\nThis package provides a simple way to use the [Slack API](https://api.slack.com).\n\nThe package is a fork from https://github.com/Vluzrmos/laravel-slack-api The original package is not maintained and I made several changes that possibly make this version incompatible to the original.\n\n### Changes made:\n\n* removed functionality to lookup user by nickname: this package provides basic functionality \n* removed cache as it was not needed anymore\n* added basic tests\n* updated slack api options on a couple of methods\n* fixed minor bugs\n\n## Installation \n\n`composer require wgmv/laravel-slack-api`\n\n## Installation on Laravel 5\n\nThe package has autodiscovery enabled. (A laravel 5.5 feature)\n\n```php\n[\n    'providers' =\u003e [\n        Wgmv\\SlackApi\\SlackApiServiceProvider::class,\n    ]\n]\n\n```\n\n## Configuration\n\nThis package uses slacks legacy tokens. Get you token here:\n\nhttps://api.slack.com/custom-integrations/legacy-tokens\n\nConfigure your slack team token in \u003ccode\u003econfig/services.php\u003c/code\u003e \n\n```php \n\n[\n    //...,\n    'slack' =\u003e [\n        'token' =\u003e 'your token here'\n    ]\n]\n\n```\n\n\n## Installation on Lumen\n\nI have not tested the lumen installation! Documentation from the original package:\n\nAdd the following line on `bootstrap/app.php`:\n\n```php\n// $app-\u003eregister('App\\Providers\\AppServiceProvider'); (by default that comes commented)\n$app-\u003eregister('Wgmv\\SlackApi\\SlackApiServiceProvider');\n\n```\n\nIf you want to use facades, add this lines on \u003ccode\u003ebootstrap/app.php\u003c/code\u003e\n\n```php\nclass_alias('Wgmv\\SlackApi\\Facades\\SlackApi', 'SlackApi');\n//... and others\n```\n\nOtherwise, just use the singleton shortcuts:\n\n```php\n/** @var \\Wgmv\\SlackApi\\Contracts\\SlackApi $slackapi */\n$slackapi     = app('slack.api');\n\n/** @var \\Wgmv\\SlackApi\\Contracts\\SlackChannel $slackchannel */\n$slackchannel = app('slack.channel');\n\netc\n```\n\n## Example Usage\n\n```php\n//Lists all users on your team\nSlackUser::lists(); \n\n//Lists all channels on your team\nSlackChannel::lists(); \n\n//List all groups\nSlackGroup::lists();\n\n//Invite a new member to your team\nSlackUserAdmin::invite(\"example@example.com\", [\n    'first_name' =\u003e 'John', \n    'last_name' =\u003e 'Doe'\n]);\n\n// or just use the helper\n\n//Autoload the api\nslack()-\u003epost('chat.postMessage', [...]);\n\n//Autoload a Slack Method\nslack('Chat')-\u003emessage([...]);\nslack('Team')-\u003einfo();\n```\n\n## All Injectable Contracts:\n\n### Generic API\n`Wgmv\\SlackApi\\Contracts\\SlackApi`\n\nAllows you to do generic requests to the api with the following http verbs:\n`get`, `post`, `put`, `patch`, `delete` ... all allowed api methods you could see here: [Slack Web API Methods](https://api.slack.com/methods).\n\n\u003c!--\nAnd is also possible load a SlackMethod contract:\n\n```php\n/** @var SlackChannel $channel **/\n$channel = $slack-\u003eload('Channel');\n$channel-\u003elists();\n\n/** @var SlackChat $chat **/\n$chat = $slack-\u003eload('Chat');\n$chat-\u003emessage('D98979F78', 'Hello my friend!');\n\n/** @var SlackUserAdmin $chat **/\n$admin = $slack('UserAdmin'); //Minimal syntax (invokable)\n$admin-\u003einvite('jhon.doe@example.com'); \n\n```\n--\u003e\n\n### Channels API\n`Wgmv\\SlackApi\\Contracts\\SlackChannel`\n\nAllows you to operate channels:\n`invite`, `archive`, `rename`, `join`, `kick`, `setPurpose` ...\n\n\n### Chat API\n`Wgmv\\SlackApi\\Contracts\\SlackChat`\n\nAllows you to send, update and delete messages with methods:\n`delete`, `message`, `update`.\n\n### Files API\n`Wgmv\\SlackApi\\Contracts\\SlackFile`\n\nAllows you to send, get info, delete,  or just list files:\n`info`, `lists`, `upload`, `delete`.\n\n### Groups API\n`Wgmv\\SlackApi\\Contracts\\SlackGroup`\n\nSame methods of the SlackChannel, but that operates with groups and have adicional methods:\n`open`, `close`, `createChild`\n\n### Instant Messages API (Direct Messages)\n`Wgmv\\SlackApi\\Contracts\\SlackInstantMessage`\n\nAllows you to manage direct messages to your team members.\n\n### Real Time Messages API\n`Wgmv\\SlackApi\\Contracts\\SlackRealTimeMessage`\n\nAllows you list all channels and user presence at the moment.\n\n\n### Search API\n`Wgmv\\SlackApi\\Contracts\\SlackSearch`\n\nFind messages or files.\n\n### Stars API\n`Wgmv\\SlackApi\\Contracts\\SlackStar`\n\nList all of starred itens.\n\n### Team API\n`Wgmv\\SlackApi\\Contracts\\SlackTeam`\n\nGet information about your team.\n\n### Users API\n`Wgmv\\SlackApi\\Contracts\\SlackUser`\n\nGet information about an user on your team or just check your presence ou status.\n\n### Users Admin API\n`Wgmv\\SlackApi\\Contracts\\SlackUserAdmin`\n\nInvite new members to your team.\n\n## License\n\n[DBAD License](https://dbad-license.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwgmv%2Flaravel-slack-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwgmv%2Flaravel-slack-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwgmv%2Flaravel-slack-api/lists"}