File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -110,28 +110,32 @@ createApp(App).mount("#app")
110110</html >
111111```
112112
113- ### .env
114-
115- ``` sh
116- APP_URL=http://localhost:8000
117- ```
118-
119113### routes/web.php
120114
121115``` php
122116<?php
117+ // Laravel routes
118+ // ...
123119
124- // Last route
125- Route::fallback( function() {
120+ // Vue routes
121+ Route::get('/', function () {
126122 return view('welcome');
127123});
124+
125+ // Vue Last route
126+ if (!app()->runningUnitTests()) {
127+ Route::fallback(function() {
128+ return view('welcome');
129+ });
130+ }
128131```
129132
130133### Build and run
131134
132135``` sh
133136npm run build
134137php artisan serve
138+ php artisan serve --host=localhost --port=8000
135139```
136140
137141## Override /build dir in page url (errors)
@@ -144,6 +148,13 @@ history: createWebHistory('/')
144148base: ' ./' ,
145149```
146150
151+ ## App url in .env
152+
153+ ``` sh
154+ # Dev server only
155+ APP_URL=http://localhost:8000
156+ ```
157+
147158## Links
148159
149160- < https://router.vuejs.org/guide >
You can’t perform that action at this time.
0 commit comments