예제 #1
0
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle()
 {
     $rec = data_employment::find($this->req['id']);
     data_employment::find($this->req['id'])->update(['id_status' => $this->req['id_status']]);
     if ($this->req['id_status'] == 2) {
         data_karyawan::create(['nm_depan' => $rec->nm_depan, 'nm_belakang' => $rec->nm_belakang, 'email' => $rec->email, 'sex' => $rec->sex, 'hp' => $rec->mobile, 'tempat_lahir' => $rec->tempat_lahir, 'tgl_lahir' => date('Y-m-d', strtotime($rec->tgl_lahir)), 'jabatan' => 1, 'alamat' => $rec->alamat, 'agama' => $rec->agama, 'pendidikan' => $rec->pendidikan, 'id_status' => 15, 'tgl_bergabung' => date('Y-m-d')]);
     } else {
     }
     return $this->req;
 }
예제 #2
0
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle()
 {
     $karyawan = data_karyawan::create(['NIK' => $this->req['nik'], 'nm_depan' => $this->req['nm_depan'], 'nm_belakang' => $this->req['nm_belakang'], 'telp' => $this->req['telp'], 'email' => $this->req['email'], 'sex' => $this->req['gender'], 'hp' => $this->req['hp'], 'tempat_lahir' => $this->req['tempat_lahir'], 'tgl_lahir' => date('Y-m-d', strtotime($this->req['tgl_lahir'])), 'jabatan' => $this->req['jabatan'], 'alamat' => $this->req['alamat'], 'agama' => $this->req['agama'], 'pendidikan' => $this->req['pendidikan'], 'id_status' => 15, 'tgl_bergabung' => date('Y-m-d', strtotime($this->req['tgl_bergabung'])), 'id_departemen' => $this->req['id_departemen']]);
     return $karyawan;
 }