Level 16
If you want to fetch partial data in your page, use axios instead.
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How can I return normal data to my Vue component?
methods: {
refresh() {
this.$inertia.get('/tenants/table_data', {
onSuccess: page => { this.tenants = page.props.tableData},
});
},
},
mounted() {
this.refresh();
},
public function tableData(Request $request) {
return response()->json(['tableData' => Tenant::all()]);
}
Please or to participate in this conversation.