Vue 2 Laravel 5.3 Eloquent unable to retrieve data from object
As you are loading vm.shop
from getShop
method, which is an async method, you will not have anything in vm.shop
till it is populated, so initially you will get this error.
To prevent this error, you can put a null check before using it, with the help of v-if, like following:
<template>.......... <div class="row" v-if="shop && shop.user"> {{shop.user.id}} </div>..........</template>