Skip to content

Commit

Permalink
Update controller.php
Browse files Browse the repository at this point in the history
  • Loading branch information
cadyrov authored Mar 11, 2020
1 parent 7118ec1 commit c680175
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crud/default/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function actionCreate()
if (!$model->save()) {
return self::error($model->getErrors());
}
self::createLog(<?php echo "" . mb_strtolower($modelClass) . ""?>, serialize($model));
self::createLog(<?php echo "'" . mb_strtolower($modelClass) . "'"?>, serialize($model));
return self::ok($model);
}

Expand Down Expand Up @@ -188,7 +188,7 @@ public function actionDelete()
}
$model->deleted_at = date('Y-m-d H:i:s');
if ($model->update()) {
self::deleteLog(<?php echo "" . mb_strtolower($modelClass) . ""?>, $id);
self::deleteLog(<?php echo "'" . mb_strtolower($modelClass) . "'"?>, $id);
return self::ok();
} else {
self::error($model->getErrors());
Expand Down Expand Up @@ -235,7 +235,7 @@ public function actionRestore()
}
$model->deleted_at = null;
if ($model->update()()) {
self::restoreLog(<?php echo "" . mb_strtolower($modelClass) . ""?>, $id);
self::restoreLog(<?php echo "'" . mb_strtolower($modelClass) . "'"?>, $id);
return self::ok();
} else {
self::error($model->getErrors());
Expand Down Expand Up @@ -293,7 +293,7 @@ public function actionUpdate()
}
?>
if ($model->save()) {
self::updateLog(<?php echo "" . mb_strtolower($modelClass) . ""?>, $id);
self::updateLog(<?php echo "'" . mb_strtolower($modelClass) . "'"?>, $id);
return self::ok($model);
}
return self::error($model->getErrors());
Expand Down

0 comments on commit c680175

Please sign in to comment.