Skip to content

Commit a5883a9

Browse files
Fix Ziggy example (#325)
* Update routing.jsx * Remove the global `route` prop setup * Update routing.jsx --------- Co-authored-by: Pascal Baljet <[email protected]>
1 parent d3fe713 commit a5883a9

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

resources/js/Pages/routing.jsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,13 @@ export default function () {
7979
<A href="https://laravel.com/docs/starter-kits">starter kits</A>, Ziggy is already configured for you.
8080
</P>
8181
<P>
82-
If you're using Ziggy with Vue, it's helpful to make this function available as a custom <Code>$route</Code>{' '}
83-
property so you can use it directly in your templates.
82+
If you're using the Vue plugin included with Ziggy, you may use the <Code>route()</Code>{' '}
83+
function directly in your templates.
8484
</P>
85-
<TabbedCode
86-
examples={[
87-
{
88-
name: 'Vue',
89-
language: 'js',
90-
code: dedent`
91-
app.config.globalProperties.$route = route
92-
`,
93-
},
94-
]}
95-
/>
9685
<CodeBlock
9786
language="html"
9887
children={dedent`
99-
<Link :href="$route('users.create')">Create User</Link>
88+
<Link :href="route('users.create')">Create User</Link>
10089
`}
10190
/>
10291
</>

0 commit comments

Comments
 (0)