Skip to content

Commit f0e71f6

Browse files
committed
Vue Starter Router
1 parent fd8102b commit f0e71f6

File tree

18 files changed

+178
-21
lines changed

18 files changed

+178
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel 11 vue 3.4 Starter
1+
# Laravel 11 vue 3.4 Starter Router
22

33
Pobierz repozytorium z githuba rozpakuj i przejdż do katalogu.
44

README_DEV.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ npm install
1313
npm install axios
1414
npm install vue@latest
1515
npm install --save-dev @vitejs/plugin-vue
16+
npm install vue-router@4
1617
```
1718

1819
### Kompilacja
@@ -60,15 +61,19 @@ php artisan migrate:fresh --env=testing
6061
php artisan storage:link
6162
```
6263

63-
### Tłumaczenia
64+
### Uruchom
6465

6566
```sh
66-
php artisan lang:publish
67+
php artisan serve
68+
php artisan serve --host=localhost --port=8000
6769
```
6870

69-
### Uruchom
71+
### Inne opcje
7072

7173
```sh
72-
php artisan serve
73-
php artisan serve --host=localhost --port=8000
74+
# Tłumaczenia
75+
php artisan lang:publish
76+
77+
# Strony błędów
78+
php artisan vendor:publish --tag=laravel-errors
7479
```

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0",
2+
"version": "2.0",
33
"name": "laravel/laravel",
44
"type": "project",
55
"description": "The skeleton application for the Laravel framework.",

package-lock.json

Lines changed: 22 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"vite": "^5.0"
1313
},
1414
"dependencies": {
15-
"vue": "^3.4.21"
15+
"vue": "^3.4.21",
16+
"vue-router": "^4.3.0"
1617
}
1718
}

public/logo/logo-dark.png

1.85 KB
Loading

public/logo/logo-light.png

1.83 KB
Loading

public/logo/logo.png

1.83 KB
Loading

resources/js/App.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
<script setup>
2+
import { RouterLink, RouterView } from 'vue-router'
3+
</script>
4+
15
<template>
2-
<div class="section">
3-
<h1>Laravel Vue Starter</h1>
4-
<p>Laravel 11 Vue 3.4 app starter with Vite.</p>
5-
</div>
6+
<!--
7+
<nav>
8+
<RouterLink to="/">Home</RouterLink>
9+
<RouterLink to="/about">About</RouterLink>
10+
</nav>
11+
-->
12+
<RouterView />
613
</template>
7-
<script setup></script>

resources/js/app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@ import './bootstrap'
22

33
import {createApp} from 'vue'
44
import App from './App.vue'
5+
import router from './router'
56

6-
createApp(App).mount("#app")
7+
const app = createApp(App)
8+
9+
app.use(router)
10+
11+
app.mount("#app")

0 commit comments

Comments
 (0)