Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joeri-abbo/laravel-slack
Setup easy and fast slack messages.
https://github.com/joeri-abbo/laravel-slack
automation laravel laravel-package slack
Last synced: 5 days ago
JSON representation
Setup easy and fast slack messages.
- Host: GitHub
- URL: https://github.com/joeri-abbo/laravel-slack
- Owner: Joeri-Abbo
- Created: 2022-06-12T09:35:16.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-12T09:55:56.000Z (over 2 years ago)
- Last Synced: 2025-02-15T03:18:13.442Z (5 days ago)
- Topics: automation, laravel, laravel-package, slack
- Language: PHP
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Laravel Slack
[](https://github.com/Joeri-Abbo/laravel-slack/actions/workflows/test.yml)
[](https://github.com/Joeri-Abbo/laravel-slack/actions/workflows/psalm.yml)
[](https://github.com/Joeri-Abbo/laravel-slack/actions/workflows/composer-normalize.yml)
[](https://github.com/Joeri-Abbo/laravel-slack/actions/workflows/php-normalize.yml)## Getting Started
### Prerequisites
- Php 8 and up
- Laravel 9
### Installation
To get started require the package with composer.```bash
composer require joeri-abbo/laravel-slack```
Publish the package for laravel
```bash
php artisan vandor:publish --provider="JoeriAbbo\LaravelSlack\LaravelSlackServiceProvider"
```Now go to your config folder and edit the slack.php file.
Add your channel id and channel name like below
```php
env('SLACK_BEARER_TOKEN'),
'channels' => [
'my-new-log-channel' => '#ID-of-slack-channel',
]
];
```
Now add the JoeriAbbo\Slack\SlackPackageServiceProvider:class to your providers array in config/app.phpAnd add your bearer token to your .env file with SLACK_BEARER_TOKEN
Now you can easily use the slack for logging or notifications.
To notify the channel use the following function.
```php
app('slack.log')->sendMessage('This is a test message')
```
## Usage## Releases
version 1.0.0
- Initial release