<?php
class DeleteAction extends BaseAction
{
    public function run()
    {
        $id = Yii::app()->request->getQuery('id');
        $chapter = Chapters::model()->findByPk($id);
        $chapter->delete();
        Yii::app()->end();
    }
}