ahmadmunif

controller

Oct 22nd, 2020 (edited)
189
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function save()
  2.     {
  3.         $data_guru=[
  4.             'no_ukg' => $this->request->getPost('no_ukg'),
  5.             'nama_guru' => $this->request->getPost('nama_guru'),
  6.             'no_hp' => $this->request->getPost('no_hp'),
  7.             'email' => $this->request->getPost('email'),
  8.             'password' => $this->request->getPost('password'),
  9.             'level' => $this->request->getPost('level'),
  10.         ];
  11.         $data_status=[
  12.             'no_ukg' => $this->request->getPost('no_ukg'),
  13.             'status' => $this->request->getPost('status'),
  14.         ];
  15.         $this->ModelGuru->insert_guru($data_guru, $data_status);
  16.         session()->setFlashdata('success','Data berhasil disimpan!');
  17.         return redirect()->to(base_url('guru'));
  18.     }
RAW Paste Data