G
G
Greeg Zagrelov2020-02-19 22:18:07
Laravel
Greeg Zagrelov, 2020-02-19 22:18:07

How to set main page in Laravel + vue js?

Good afternoon, I ran into such a problem, how to set the main page?
I did here import index from './components/index'; created, and so on ... maybe someone has an article in stock?

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

import Home from './components/Home';
import About from './components/About';
import Create from './components/Create';


Vue.use(VueRouter);
const router = new VueRouter({
    mode:'history',
    routes:[

        {
            path:'/home',
            name:'home',
            component: Home
        },
        {
            path:'/about',
            name:'about',
            component: About
        },
        {
            path:'/create',
            name:'create',
            component: Create
        }
    ]

});
export  default router;


Route::get('/{any}', '[email protected]')->where('any', '.*');
Auth::routes();

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question