Ejemplo n.º 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();
     //}
 }
Ejemplo n.º 3
0
 public function postImportToTable(Request $req)
 {
     // dd($req->get('data'));
     // if ($req->get('data')) {
     // 		Bidang::insert($req->get('data'));
     // 		$response['code']=200;
     // 		$response['msg']="Import File Selesai";
     // 		return json_encode($response);
     // }
     $response['msg'] = '';
     $response['code'] = 200;
     if ($req->get('data')) {
         foreach ($req->get('data') as $value) {
             $row = json_encode($value);
             if (!Bidang::create($value)) {
                 $response['msg'] .= "Data ini {$row} Error <br>";
                 return json_encode($response);
             } else {
                 $response['msg'] .= "Data ini {$row}  OK <br>";
             }
         }
         return json_encode($response);
     }
     $response['code'] = 404;
     $response['msg'] = "Gagal Import File !!!";
     return json_encode($response);
 }
Ejemplo n.º 4
0
        }
        return $siblings;
    };
    $tree = $fnBuilder($grouped[0]);
    return $tree;
}
Route::get('mr', function () {
    // return response()->json(['succes'=>'belajajjjjjj']);
    $exitCode = Artisan::call('route:list', ['name']);
    // dd($exitCode);
    // Artisan::call('help');
    dd(Artisan::output());
});
Route::get('valid', function () {
    $data = array('color' => '5', 'size' => '');
    $mod = new Bidang();
    // dd( $mod->validate( $data));
    $validate = $mod->validate($data);
    $mod->validate($data);
    $messages = $validate->messages();
    if ($validate->fails()) {
        dd($messages->toArray());
    } else {
        return 'Okkkkkk';
    }
});
Route::group(['namespace' => 'extend\\sentinel'], function () {
    Route::get('profile/editPass', ['as' => 'ExtendProfile.editPass.edit', 'uses' => 'ProfileController@editPass']);
    Route::post('profile/password', ['as' => 'sentinel.profile.password', 'uses' => 'ProfileController@changePasswordX']);
    Route::put('profile', ['as' => 'sentinel.profile.update', 'uses' => 'ProfileController@updateX']);
    Route::any('users/data', ['as' => 'ExtendUser.users.data', 'uses' => 'UserController@getUsers']);