File tree Expand file tree Collapse file tree 1 file changed +22
-11
lines changed
Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Original file line number Diff line number Diff line change 1- # Vue 3 with router, stores and locales
1+ # Vue 3 in Laravel with router, stores and locales
22
3- How To Install Vue 3 in Laravel 10 with Vite (router, locales, stores).
3+ How To Install Vue 3 in Laravel 11 with Vite (router, locales, stores).
44
55## Create project
66
7- Copy files from vue to laravel-project directory.
7+ Copy files from ** vue** to laravel-project directory.
88
99``` sh
10- composer create-project --prefer-dist laravel/laravel:^10.0 laravel-project
11- cd laravel-project
12- ```
10+ composer create-project --prefer-dist laravel/laravel:^11 laravel-project
1311
14- ### Change in .env
15-
16- ``` sh
17- APP_URL=http://localhost:8000
12+ cd laravel-project
1813```
1914
2015### Add in routes/web.php
2116
2217``` php
2318<?php
24- // Last route
19+ // Laravel routes
20+ // ...
21+
22+ // Vue routes
23+ Route::get('/', function () {
24+ return view('welcome');
25+ });
26+
27+ // Vue Last route
2528Route::fallback(function() {
2629 return view('welcome');
2730});
@@ -45,4 +48,12 @@ npm install @googlemaps/js-api-loader
4548``` sh
4649npm run build
4750php artisan serve
51+ php artisan serve --host=localhost --port=8000
52+ ```
53+
54+ ### Change in .env
55+
56+ ``` sh
57+ # Dev server only
58+ APP_URL=http://localhost:8000
4859```
You can’t perform that action at this time.
0 commit comments