0👍
I experienced the same issue with laravel 8.x and resolved it as follows
- Make sure your installed the appropriate frontend scafolding with the below commands:
php artisan ui bootstrap and
php artisan ui vue
- Run the below commands:
npm install and
npm run dev
-
Follow the below syntax to define your view components:
Vue.component(
‘example-component’,
require(‘./components/ExampleComponent.vue’).default
); -
Include the vue component in your blade view file as follows:
@extends(‘layouts.app’)
@section(‘content’)
<example-component></example-component>
@endsection
- Recompile your vue components with the command:
npm run dev
Source:stackexchange.com