how to install the project
- clone the github link
- run composer install
- php artisan generete:key
- npm install
- php artisan serve
what i used in this project
-
install a laravel project with command composer create-project laravel/laravel app "8.*".
-
Install Vue 3 npm install --save vue@next && npm install --save-dev vue-loader@next
-
Open webpack.mix.js and add .vue() the method as I added in the below code:
-
const mix = require('laravel-mix'); mix.js('resources/js/app.js', 'public/js') .vue() .postCss('resources/css/app.css', 'public/css', [ // ]);
-
Open resources/js/app.js and update the following code into that file: require('./bootstrap');
-
import { createApp } from 'vue'; import router from './routes';
import User from './Helper/User'; window.User = User
const app = createApp({})
app.use(router)
app.mount('#app') 7. make a file route.js all component import there
-
run the command
-
npm i vue-router@next
-
go to resource/views/welcome.blade.php and set there
<router-view/> </div> <script src="{{ mix('js/app.js') }}"></script>
-
npm run watch
-
run the project
-
php artisan serve