Skip to content

Commit

Permalink
Merge pull request #3 from Fred07/feature/fix-register-for-binding-se…
Browse files Browse the repository at this point in the history
…rvice

Change register method
  • Loading branch information
Fred07 authored Nov 20, 2020
2 parents 2654b3a + d4b75d3 commit 48129e1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [1.2.0] - 2020-11-20

### Changed

- 調整 `SlackServiceProvider` 的註冊方式,使用 `register` 在啟動時就註冊,避免發生前期 exception 時,找不到 `slack` 實體的問題

---

[Unreleased]: https://github.com/Fred07/laravel-slack/compare/1.2.0...master
[1.2.0]: https://github.com/Fred07/laravel-slack/compare/1.1.0...1.2.0
7 changes: 5 additions & 2 deletions src/SlackServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@

class SlackServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->registerClients();
}

public function boot(): void
{
$this->publishes([
__DIR__ . '/../config/slack.php' => config_path('slack.php'),
], 'config');

$this->registerClients();
}

protected function registerClients(): void
Expand Down

0 comments on commit 48129e1

Please sign in to comment.