Skip to content

Commit f5288ba

Browse files
authored
Update README.md
1 parent e9395ca commit f5288ba

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Guarantee database stickiness over the same user's consecutive requests.
1313
composer require mpyw/laravel-cached-database-stickiness
1414
```
1515

16-
The default implementation is provided by `ConnectionServiceProvider`, however, **package discovery is not available**.
16+
> [!IMPORTANT]
17+
> The default implementation is provided by `ConnectionServiceProvider`, however, **package discovery is not available**.
1718
Be careful that you MUST register it in **`config/app.php`** by yourself.
1819

1920
```php
@@ -75,8 +76,9 @@ This library provides the following features.
7576

7677
### Customize Stickiness TTL
7778

78-
The default stickiness TTL is `5` seconds.
79-
You can configure this value to add **`stickiness_ttl`** directive to your `config/database.php`.
79+
> [!NOTE]
80+
> The default stickiness TTL is `5` seconds.
81+
> You can configure this value to add **`stickiness_ttl`** directive to your `config/database.php`.
8082
8183
```php
8284
<?php
@@ -131,10 +133,10 @@ return [
131133

132134
### Customize Connection Implementation
133135

134-
You can configure Connection implementation.
135-
136-
- Make sure `ConnectionServiceProvider` to be removed from `config/app.php`.
137-
- Extend Connection with `DispatchesConnectionEvents` trait by yourself.
136+
> [!TIP]
137+
> You can configure Connection implementation.
138+
> - Make sure `ConnectionServiceProvider` to be removed from `config/app.php`.
139+
> - Extend Connection with `DispatchesConnectionEvents` trait by yourself.
138140
139141
```php
140142
<?php
@@ -172,7 +174,8 @@ class MySqlConnection extends BaseMySqlConnection
172174

173175
### Customize Stickiness Source
174176

175-
You can register the `StickinessResolverInterface` implementation to change the source for stickiness determination.
177+
> [!TIP]
178+
> You can register the `StickinessResolverInterface` implementation to change the source for stickiness determination.
176179
177180
```php
178181
<?php
@@ -197,7 +200,8 @@ class DatabaseServiceProvider extends ServiceProvider
197200
| `IpBasedResolver`<br>**(Default)**| Remote IP address | |
198201
| `AuthBasedResolver` | Authenticated User ID | Required |
199202

200-
You must add **`ResolveStickinessOnResolvedConnections`** middleware after `Authenticate`
203+
> [!IMPORTANT]
204+
> You must add **`ResolveStickinessOnResolvedConnections`** middleware after `Authenticate`
201205
when you use `AuthBasedResolver`.
202206

203207
```diff
@@ -271,7 +275,8 @@ when you use `AuthBasedResolver`.
271275

272276
### Customize Worker Behavior
273277

274-
You can register the `JobInitializerInterface` implementation to change workers' behavior.
278+
> [!TIP]
279+
> You can register the `JobInitializerInterface` implementation to change workers' behavior.
275280
276281
```php
277282
<?php
@@ -298,7 +303,8 @@ class DatabaseServiceProvider extends ServiceProvider
298303

299304
## Attention
300305

301-
### Don't call `Schema::defaultStringLength()` in `ServiceProvider::boot()`
306+
> [!CAUTION]
307+
> ### Don't call `Schema::defaultStringLength()` in `ServiceProvider::boot()`
302308
303309
#### Problem
304310

0 commit comments

Comments
 (0)