public function action_crop_upload() { $path = Input::post('imgpath'); $upload_id = Input::post('upload_id'); $Model_Upload = new Model_Upload(); $output = $Model_Upload->cropCoverPhoto($path, $upload_id); $data['background_name'] = $output; $data['status'] = "success"; $data['msg'] = "Cropped Successfully"; $data['response'] = json_encode($data); $this->template = View::forge('response', $data, false); }