public function getDelete($id)
 {
     $pendidikan = Pendidikan::find($id);
     if ($pendidikan->delete()) {
         return Redirect::to('pendidikan')->with('succes', 'Anda Berhasi Menghapus data Pendidikan');
     } else {
         return Redirect::to('pendidikan')->with('error', 'Anda gagal menghapus data ini');
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $pendidikan = Pendidikan::find($id);
     if ($pendidikan->delete()) {
         return Response::json(array('success' => TRUE));
     }
 }
Esempio n. 3
0
 public function searchAll($params)
 {
     $query = Pendidikan::find()->JoinWith('emp', true, 'INNER JOIN')->JoinWith('user', true, 'INNER JOIN');
     //->Where(['a0001.EMP_ID'=>'LG.0005']);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     return $dataProvider;
 }