feat: bootstrap Vue 3 app with Vue Router and Axios
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
24
resources/js/router/index.js
Normal file
24
resources/js/router/index.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
import DashboardLayout from '../views/dashboard/DashboardLayout.vue'
|
||||
import Overview from '../views/dashboard/Overview.vue'
|
||||
import SavedStations from '../views/dashboard/SavedStations.vue'
|
||||
import Preferences from '../views/dashboard/Preferences.vue'
|
||||
|
||||
const routes = [
|
||||
{ path: '/', component: Home, name: 'home' },
|
||||
{
|
||||
path: '/dashboard',
|
||||
component: DashboardLayout,
|
||||
children: [
|
||||
{ path: '', component: Overview, name: 'dashboard' },
|
||||
{ path: 'saved-stations', component: SavedStations, name: 'dashboard.saved-stations' },
|
||||
{ path: 'preferences', component: Preferences, name: 'dashboard.preferences' },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export default createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
})
|
||||
Reference in New Issue
Block a user