createInertiaApp({
resolve: (name) => {
let page = resolvePageComponent(
`./Pages/${name}.vue`,
import.meta.glob('./Pages/**/*.vue')
);
page.then((module) => {
module.default.layout ??= Layout;
});
return page;
},
setup({ el, App, props, plugin }) {
createApp({ render: () => h(App, props) })
.use(plugin)
.component("Link", Link)
.mount(el)
},
});
Last active
September 26, 2022 14:47
-
-
Save darrylmorley/c65e47626447edf7c99e2fa9f24c6b7e to your computer and use it in GitHub Desktop.
Laravel
Quickstart for Laravel inertia apps with Vue:
- composer require laravel/breeze --dev
- php artisan breeze:install vue
This does the following:
- Generates the app.blade.php and its contents.
- Middleware, which generates the HandleInertiaRequests middleware.
- Install dependencies, client-side adapters, and progress indicators.
- Initialize app, which updates our app.js file under the resources/js with the proper config.
- Generates tailwind.config.js
- Generates webpack.mix.js
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment