\app\models\Kd::find()->andWhere(['>','order',2])->orderBy(["order"=>SORT_ASC])->limit(2), "pagination" => false ] ); $sort = $newsDataProvider->getModels(); //print_r($sort); $ActiveNews = new \yii\data\ActiveDataProvider(); $models = []; //$models[] = \app\models\News::findOne($NH[0]->id); foreach( $sort as $item ){ $models[] = \app\models\News::findOne($item->id); } $ActiveNews->setModels($models); print_r($ActiveNews); print_r($_POST); $form = ActiveForm::begin([ 'id' => 'test-form', 'options' => ['class' => 'form-horizontal', 'enctype' => 'multipart/form-data']]); ?> 'image', 'file' => 'photo', 'post' => 'cropping']); echo Html::submitButton('Send', ['class' => 'btn btn-success']); ActiveForm::end();