You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,36 @@
2
2
3
3
All notable changes to `laravel-unique-urls` will be documented in this file.
4
4
5
+
## v2.1.0 - 2026-02-12
6
+
7
+
### What's New
8
+
9
+
#### Pluggable ControllerResolver
10
+
11
+
Controller resolution is now delegated to a `ControllerResolver` contract, making the package fully extensible without modifying its source.
12
+
13
+
-**`Contracts\ControllerResolver`** — interface with a single `resolve(string $controller): ?object` method
14
+
-**`Resolvers\DefaultControllerResolver`** — ships with the package; resolves FQCNs via `class_exists()` and Livewire component names via `app('livewire')->new()` (only when Livewire is installed)
15
+
- Bound as a singleton with `singletonIf`, so apps can override it by binding their own implementation before the package boots
16
+
17
+
#### Upgrading from v2.0.x
18
+
19
+
No breaking changes. The default resolver handles both FQCNs and Livewire component names out of the box. The inline `isLivewireComponentName()` check from v2.0.0 has been replaced by the resolver.
20
+
21
+
To provide custom resolution logic (e.g. Inertia, custom routing):
Copy file name to clipboardExpand all lines: docs/usage.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,4 +183,29 @@ public function urlHandler(): array
183
183
}
184
184
```
185
185
186
-
The package detects names without backslashes and resolves them via `app('livewire')->new()`.
186
+
The default resolver tries `class_exists()` first, then falls back to `app('livewire')->new()` when Livewire is installed.
187
+
188
+
## Custom Controller Resolution (v2.1+)
189
+
190
+
Controller resolution is handled by the `ControllerResolver` contract. The default implementation supports both FQCNs and Livewire component names. To customize resolution (e.g. for Inertia or other frameworks), bind your own implementation:
191
+
192
+
```php
193
+
use Vlados\LaravelUniqueUrls\Contracts\ControllerResolver;
0 commit comments