public function postSaveNew()
 {
     $pendidikan = new Pendidikan();
     $pendidikan->jenjangpendidikan = Input::get('jenjangpendidikan');
     if ($pendidikan->save()) {
         return Redirect::to('pendidikan')->with('success', ' Anda Berhasil Menambah Pendidikan');
     } else {
         return Redirect::to('pendidikan')->with('error', 'Anda Gagal Menympan Data Pendidikan');
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     //
     $data = Input::All();
     $data['tanggal_sttb'] = formatDate($data['tanggal_sttb']);
     $data['tanggal_lulus'] = formatDate($data['tanggal_lulus']);
     $pendidikan = new Pendidikan($data);
     if ($pendidikan->save()) {
         return Response::json(array('success' => true));
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate($id)
 {
     $model = new Pendidikan();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Pendidikan'])) {
         $model->attributes = $_POST['Pendidikan'];
         if ($model->save()) {
             $this->redirect(array('view', 'id' => $model->id_pendidikan));
         }
     }
     $this->render('create', array('model' => $model, 'id' => $id));
 }