Skip to content

Commit 0bd40e5

Browse files
committed
add context
1 parent 11a9682 commit 0bd40e5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/Livewire/VersionSwitcher.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class VersionSwitcher extends Component
1717

1818
public function mount(array $versions)
1919
{
20+
// Since the props are always bound to the uri we fetch them
21+
// from the route instead of prop drilling or adding
22+
// single-use view data to the controller
23+
2024
throw_unless(
2125
request()->route()->named('docs.show'),
2226
ViewException::class,

0 commit comments

Comments
 (0)