/** * Action to reset all tip and show them again */ public function actionResetTours() { Tours::model()->updateAll(array('seen' => null), 'profileId=:profileId', array('profileId' => Yii::app()->params->profile->id)); echo 'success'; }
/** * Action called to mark a tour (tip) as seen * @param int $id ID of the tip */ public function actionTourSeen($id) { Tours::model()->updateByPk($id, array('seen' => true)); echo 'success'; }