return User::find()
->alias('u')
->leftJoin('project_user pu', 'pu.user_id = u.id')
->with(['components']) // это тот самый вызов
->select(['u.id', 'u.username'])
->where(['=', 'pu.project_id', $project_id])
->asArray()
->all();
return $this->hasMany(AccessComponentUser::class, ['user_id' => 'id'])
->select('component_id');
hosts
залезть и вручную прописать там алиасы. table: [],
this.$store.dispatch('SAVE_TABLE', [window.location.href, data]);
SET_TABLE: (state, payload) => {
state.table[payload[0]] = payload[1];
// state.table = [];
},
undefined
выведет.console.log(this.$store.getters.TABLE);
0: {http://localhost:8080/menu/5/1: {,…}}
1: {http://localhost:8080/menu/5/1: {,…}}
a = {}
, что так a = []
, console.log
все равно скажет, что это обьект