public function deleteAction($id)
    {
        $this->view->disable();
        $banner = Banner::findFirstByid($id);
        if (!$banner) {
            $alert  = "error";
            $msg    = "banner not Found";
        }
        if (! empty($banner->file)) {
            if(file_exists($this->path.$banner->file)){
                unlink($this->path.$banner->file);
            }
        }
        if (!$banner->delete()) {
            $alert  = "error";
            $msg    = " ";
            foreach ($banner->getMessages() as $message) {
                $msg .= $message." ";
            }
        }else{
            $alert  = "sukses";
            $msg    = "banner was deleted ";
        }

        $response = new \Phalcon\Http\Response();
        $response->setContentType('application/json', 'UTF-8');
        $response->setJsonContent(array('_id' => $id,'alert' => $alert, 'msg' => $msg ));
        return $response->send();
    }