I have been working on making a simple vue js and laravel data displaying web page it is meant to display all the data in a table but I have had no such luck in doing so I have already posted this question but the error has now changed so I am posting again. I am able to see all the json data when I go to the /api directory even the different pages I will need for pagination with all the page numbers is there but when I go to the console I get a Json Error:
Source map error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON
data
Resource URL: http://127.0.0.1:8000/js/app.js
Source Map URL: laravel-vue-pagination.common.js.map
Not sure what this means or if it has any relevance to the data not being showed on the table or is there something else. Also when I load up the code editor my vue extension says it cannot find the tsconfig.json or jsconfig.json in project file.
So, any help is much appreciated here is the code: Home.blade.php:
@extends('layouts.app')
@section('content')
<div class="container" id="app">
<home-component></home-component>
</div>
@endsection
HomeComponent:
<template>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Home component</div>
<ul>
<li v-for="post in laravelData.data" :key="post._id">{{ post.STATUS }}</li>
</ul>
<Pagination :data="laravelData" @pagination-change-page="getResults" />
</div>
</div>
</div>
</div>
</template>
<script>
import LaravelVuePagination from 'shetabit-laravel-vue-pagination';
export default{
components: {
'Pagination': LaravelVuePagination
},
data() {
return {
laravelData: {}
};
},
mounted(){
this.getResults();
},
methods:{
getResults(page = 1) {
axios.get('api/users?page=' + page)
.then(response => {
this.laravelData = response.data;
});
}
},
}
</script>
api route:
Route::middleware('api')->group(function () {
Route::get('/home', [PostController::class, 'home']);
});
Web route:
Route::get('{any}', function () {return view('home');})->where('any', '.*');
PostController
public function home() {
$posts = Post::paginate(4);
return response()->json($posts);
}
Output when console logging response:

If you need the versions use
Laravel:8.83
vue:"^2.6.12"
laravel-vue-pagination:"^2.3.1"