How to access to the query parameters in laravel + inertia vue js.?
<script>
export default {
computed: {
reference() {
return this.$page.props.query.reference || 'No reference provided';
}
}
};
</script>
How to access to the query parameters in laravel + inertia vue js.?
<script>
export default {
computed: {
reference() {
return this.$page.props.query.reference || 'No reference provided';
}
}
};
</script>
2
Answers
We can access using this way. its working for me.
You could do something like this:
This can then be injected via
mixins
or better still you can make it a composable.