| Current Path : /var/www/html/swcorpdataraya/frontend/controllers/ |
| Current File : /var/www/html/swcorpdataraya/frontend/controllers/NotificationController.php |
<?php
namespace frontend\controllers;
use Yii;
use yii\web\Controller;
class NotificationController extends Controller {
public function actionGetcontent($code = '') {
$output = \common\models\NotificationTemplate::getcontent($code);
echo $output;
}
public function actionUpdateread($noti_id) {
if (($model = \common\models\NotificationLog::findOne($noti_id)) !== null) {
$model->noti_read_status = 1;
$model->updated_at = date("Y-m-d H:i:s");
$model->updated_by = Yii::$app->user->identity->id;
$model->updated_user_type = 'frontend_user';
if ($model->save(false)) {
return 'success';
}
}
}
}