---
# System prepended metadata

title: Lavavel + Vue3
tags: [Vue, Laravel]

---

###### tags: `Laravel`, `Vue`

# Lavavel + Vue3
命令列執行：
```shell
$ composer require laravel/ui
$ php artisan ui vue
$ yarn add vue@next
$ yarn add vuex@next
$ yarn add vue-router@next
```

建立 App.vue 檔
修改 app.js

```javascript=
import { createApp } from "vue";
import App from "./App.vue";
createApp(App).mount("#app");
```
確定 webpack.mix.js

```javascript
mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css')
    .vue().version();
```
中有
```javascript
.vue()
```

