Customization

In this section you will learn about how to customize the template. Please read the documentation carefully.

How to add a New Page

To add a new page follow the instructions given below:

1. Create a file with the extension .vue under the vuely-laravel->resources->js->views directory. You can also create your file under the your-page-name directory. See the given below example we have taken an example of TestPage that we are going to create.

TestPage.vue
<template>
    <div class="">
        <h4>I'm your Test Page</h4>
    </div>
</template>

2. After created file you need to declare its route where it can be serve on the browser, suppose you created page will be serve on the route like http://localhost:8080/test-page . To access this page define its routes in the vuely-laravel -> resources -> js -> router -> index.js file.

import Vue from 'vue'
import Router from 'vue-router'

//routes
...
...

Vue.use(Router)

export default new Router({
	mode: 'history',
	routes: [
		...,
		{
			path: '/test-page',
			component: resolve => require(['../views/test-page/TestPage.vue'], resolve),
			meta: {
				title: 'message.testPage',
				breadcrumb: 'Test Page'
			}
		}
	]
})

After defining the route you need to add a new menu in the sidebar or horizontal navigation. To add the menu go to the vuely-laravel->resources->js->store->modules->sidebar directory and open data.js file.

data.js
// Sidebar Routers
export const menus = {
	'message.general': [
		...,
		{
			action: 'zmdi-view-dashboard',
			title: 'Test Page',
			path: '/test-page',
			items: null
		}
	]
}

After completing these above steps you need to run the command npm run dev command in the project directory. After running this process you need to run the command php artisan serve . It will serve your app on the localhost.

For more customization you can follow the same steps that is in the other documentation topics.

Last updated