$query = static::find()->select(['u.*','resume.*']);
$query->leftJoin('user u', 'u.id=resume.user_id');
$data = $query->all();
var_dump($data);die;
如果不加->asArray()擷取不到聯表資料,
須加上 $data = $query->asArray()->all();
$query = static::find()->select(['u.*','resume.*']);
$query->leftJoin('user u', 'u.id=resume.user_id');
$data = $query->all();
var_dump($data);die;
如果不加->asArray()擷取不到聯表資料,
須加上 $data = $query->asArray()->all();