Skip to content

Instantly share code, notes, and snippets.

@ortzinator
Last active September 20, 2021 21:04
Show Gist options
  • Save ortzinator/ceec18e42c4b88d3b7cb6cf4cb8d7fd1 to your computer and use it in GitHub Desktop.
Save ortzinator/ceec18e42c4b88d3b7cb6cf4cb8d7fd1 to your computer and use it in GitHub Desktop.
Inertia reactive navigation
const navigation = ref([
{
name: 'Dashboard',
get href() {
return route('dashboard');
},
get current() {
return route().current('dashboard');
}
},
{
name: 'Policies',
get href() {
return route('policies');
},
get current() {
return route().current('policies');
}
},
{
name: 'Contacts',
get href() {
return route('contacts');
},
get current() {
return route().current('contacts');
}
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment