public function createAction()
    {
        $this->view->disable();
        $msg = "";
        if(!is_dir("upload/banner/")){
            if (!mkdir($this->path, 0777, true)) {
                die('Failed to create folders...');
            }
        }
        if($this->request->hasFiles() !== false) {

            $uploader = new \Uploader\Uploader([
                'directory' =>  "upload/banner/",
                'mimes'     =>  [
                    'image/gif',
                    'image/jpeg',
                    'image/png',
                ],
                'extensions'     =>  [
                    'gif',
                    'jpeg',
                    'jpg',
                    'png',
                ],

                'sanitize' => true,  // escape file & translate to latin
                'hash'     => 'md5'
            ]);

            if($uploader->isValid() === true) {

                $uploader->move();

                $file   = $uploader->getInfo();
                $alert  = "sukses";
                $msg    .= $file[0]['filename']." ";
                $_file  = $file[0]['filename'];
            }
            else {
                $alert  = "error";
                $msg    .= $uploader->getErrors()[0];
                $_file  = " ";
            }
        }
        $banner = new Banner();
        $banner->order          = $this->request->getPost("order");
        $banner->publish        = $this->request->getPost("publish");
        $banner->description    = $this->request->getPost("description");
        $banner->description1   = $this->request->getPost("description1");
        $banner->link           = $this->request->getPost("link");
        $banner->file           = $_file;
        $banner->create_user    = $this->auth->getIdentity()['id'];

        if (!$banner->save()) {
            $alert  = "error";
            foreach ($banner->getMessages() as $message) {
                $msg .= $message." ";
            }
        }else{
            $alert  = "sukses";
            $msg    .= "Banner was created successfully";
        }

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