JumpGate does a few common things for you when it comes to inertia. Aside from the auto resolving route -> page file, it also passes some common data to inertia for you.
Just like inertia suggests, we store passed data in the app/Http/Middleware/HandleInertiaRequests.php
. By default we
share the results of our basic menus (admin, left menu, right menu) and common flash messages (success and error). These
get passed down and used by our included vue files.
resources/js/Shared/Layout
and resources/js/Shared/Admin
.resources/js/Shared/Menu/Main
(for the left and right menus) and the admin menu is used in
resources/js/Shared/Admin/Main
.If you want to add anything to shared, this would be where and how to do it.
When first trying out inertia we used axios for submitting forms from the vue pages. Inertia has updated since then and has some amazing built in form handling. You can see examples of this in some of our user package pages. For the basic docs (which are very easy to follow), look directly to their site.
We also include some common packages used in Vue/Inertia. All of these packages are set up in app.ts
.
Package | What it does | Docs | |
---|---|---|---|
Portal-Vue | Allows placing components anywhere. | Docs | |
Vue-Meta | Easily allows adding meta tags from Vue. | Docs | |
Moment-Vue | Adds moment.js into vue. | GitHub | Moment.js |
Inertia Progress | Adds a progress bar when the page is loading. | Docs | |
Ziggy | Adds laravel routes to js. | GitHub |