示例#1
0
 public function edit($id)
 {
     $user = User::findOrFail($id);
     $seksis = \App\Seksi::lists('nama_seksi', 'id');
     $bidangs = \App\Bidang::lists('nama_bidang', 'id');
     $roles = \App\Role::where('id', '<>', '3')->lists('description', 'id');
     if ($user->role_id != '3') {
         return view('user.edit', ['user' => $user, 'seksis' => $seksis, 'bidangs' => $bidangs, 'roles' => $roles]);
     }
 }
 public function create()
 {
     $peminjaman = new PeminjamanPerangkatLunak();
     //Cookie::forget('pl_id');
     $pl_id = Cookie::get('pl_id');
     $bidangs = \App\Bidang::lists('nama_bidang', 'id');
     $seksis = \App\Seksi::lists('nama_seksi', 'id');
     //$seksis = \App\Seksi::lists('nama_seksi','id');
     //if($pl_id != NULL) {
     //$pl_data =
     //print_r($pl_data->id);exit;
     return view('peminjaman_pl.create', ['peminjaman' => $peminjaman, 'pl_data' => $pl_id == NULL ? $pl_id : PerangkatLunak::find($pl_id), 'seksis' => $seksis, 'bidangs' => $bidangs]);
     //}
     //else {
     //    echo 'Cookie kosong';
     //}
     //else {
     //    $this->pilihdulu();
     //}
 }