Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How To Install Vue 3 in Laravel 8 From Scratch

App.js

import * as Vue from 'vue';
import * as VueRouter from 'vue-router';

import {routes} from './routes';

const router = VueRouter.createRouter({
  history: VueRouter.createWebHistory(),
  routes,
});

Vue.createApp(App).use(router).mount('#App');






routes.js

import { createRouter, createWebHistory } from 'vue-router'
let login = require('./components/auth/login.vue').default;
let reg = require('./components/auth/register.vue').default;
let forget = require('./components/auth/forget.vue').default;


export const routes = [
    { path: '/', component: login , name: '/' },
    { path: '/re', component: reg , name: 'register' },
    { path: '/forget', component: forget , name: 'forget_password' },
  ]
Source by techvblogs.com #
 
PREVIOUS NEXT
Tagged: #How #To #Install #Vue #Laravel #From #Scratch
ADD COMMENT
Topic
Name
7+9 =