/**
* @return \yii\db\ActiveQuery
*/
public function getAuthors()
{
$data = $this->hasMany(Authors2products::className(), ['products_id' => 'id'])->asArray()->all();
if(count($data)) {
$result = [];
foreach($data as $k => $v) {
$result[] = $v['authors_id'];
}
return $result;
}
return [];
}