In Laravel I am trying to render .Vue file inside blade but it is not displayed
Check my code app.js
const app = createApp({});
app.component('test-component', TestComponent);
app.mount('#app');
test.blade.php
@extends('layouts.app')
@section('content')
<div id="app">
<test-component></test-component>
</div>
@endsection
TestComponent.vue
<template>
<div>
<h2>This is a Test Component</h2>
<p>Hello from Vue!</p>
</div>
</template>
<script>
export default {
// Component logic
};
</script>
<style scoped>
/* Component-specific styles */
</style>
Format your code when posting it on the forum.
You can do this by adding 3 backticks ``` before and after the code.
Example:
```
YOUR CODE
```
For your issue add the component inside the section
@section('content')
<test-component></test-component>
@endsection
Please or to participate in this conversation.