Witam, mam taki kod w Laravelu
return response()->json([
'status' => 'success',
'data' => [
'article' => $article,
'category' => $category
]
],200);
i później je odbieram
const state = {,
article: []
}
const getters = {
article: state => {
return state.article
}
}
const actions = {
getArticle({commit}, id){
axios(`article/view/${id}`)
.then(result => commit('ARTICLE', result.data.data))
}
}
const mutations = {
ARTICLE(state, article){
state.article = article
}
}
export default {
state,
getters,
actions,
mutations
}
i teraz kiedy odwołuję się
{{article.article.title}}
to dane są bez problemu wyświetlane
a kiedy chcę kategorię
{{article.category.name}}
nie działa
Co robię źle?