Yii
6
Вклад в тег
$.ajax({
url: "/url"
}).done(function(data) {
console.log(data);
});
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
return Posts::find()
->where(array('group_id' => $group_id,'post_id' => $post_id))
->one();
<?php $this->widget('bootstrap.widgets.TbGridView',array(
'id'=>'ref-mahala-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
array(
'name' => 'district_id',
'value' => '$data->region->name',
),
'name_ru',
'name_uz',
'name_en',
'address_ru',
array(
'class'=>'bootstrap.widgets.TbButtonColumn',
),
),
)); ?>
The database and PHP classes are now ready to be used. But they don't know yet how to communicate with each other at runtime. You must tell Propel which database connection settings should be used to finish the setup.