user card sort
This commit is contained in:
parent
7d145b8fa6
commit
4c3930f5e6
@ -152,7 +152,9 @@ class UserCardController extends Controller
|
|||||||
public function actionUpdate($id)
|
public function actionUpdate($id)
|
||||||
{
|
{
|
||||||
$model = $this->findModel($id);
|
$model = $this->findModel($id);
|
||||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
if ($model->load(Yii::$app->request->post())) {
|
||||||
|
$model->updated_at = date('Y-m-d h:i:s');
|
||||||
|
$model->save();
|
||||||
return $this->redirect(['view', 'id' => $model->id]);
|
return $this->redirect(['view', 'id' => $model->id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,9 @@ class UserCardSearch extends UserCard
|
|||||||
|
|
||||||
$query->andFilterWhere(['skill.id' => $this->skills]);
|
$query->andFilterWhere(['skill.id' => $this->skills]);
|
||||||
|
|
||||||
$query->orderBy('user_card.created_at DESC');
|
$query->orderBy('user_card.updated_at DESC');
|
||||||
|
|
||||||
|
$query->groupBy('card_skill.card_id');
|
||||||
|
|
||||||
$sumQuery = clone $query;
|
$sumQuery = clone $query;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user