Skip to content

How to send menu and other config options to Inertia? #462

Answered by claudiodekker
zorca asked this question in Help
Discussion options

You must be logged in to vote

Hi,

Currently, Inertia does not support this, as often menu items etc. depend on permissions, and since permissions can change, re-fetching information and having it updated really isn't that much of a big deal

However, of course each use-case differs, so if you have a ton of menu items and/or settings that won't change (often), and really think only setting it on the initial render is the way to go, my recommendation would be to just use the app.blade.php file to assign the menu into a (global) javascript variable.

If you do this in the head of your page before the line where Inertia/Vue is loaded, you can immediately rely on it being set and use it without the need to do any further js-…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by claudiodekker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants