update fitur pass user
All checks were successful
Run Action to Production / run pull to sync on target message (push) Has been skipped
All checks were successful
Run Action to Production / run pull to sync on target message (push) Has been skipped
This commit is contained in:
parent
b96cea3047
commit
c476be7cff
|
@ -40,7 +40,7 @@ public function store(Request $request){
|
||||||
$user->nama_gelar = $request->nama_gelar;
|
$user->nama_gelar = $request->nama_gelar;
|
||||||
$user->email = $request->email;
|
$user->email = $request->email;
|
||||||
$user->ettd = $request->ettd;
|
$user->ettd = $request->ettd;
|
||||||
$user->password = Str::random(12);
|
$user->password = $request->password;
|
||||||
|
|
||||||
if($user->save()){
|
if($user->save()){
|
||||||
return redirect()->route('users.index')->with('success','Data Telah Berhasil Disimpan');
|
return redirect()->route('users.index')->with('success','Data Telah Berhasil Disimpan');
|
||||||
|
@ -74,8 +74,13 @@ public function update(Request $request){
|
||||||
$user->nama_gelar = $request->nama_gelar;
|
$user->nama_gelar = $request->nama_gelar;
|
||||||
$user->email = $request->email;
|
$user->email = $request->email;
|
||||||
$user->ettd = $request->ettd;
|
$user->ettd = $request->ettd;
|
||||||
$user->password = Str::random(12);
|
|
||||||
|
|
||||||
|
if($request->password==""){
|
||||||
|
$user->save();
|
||||||
|
return redirect()->route('users.index')->with('success','Data Telah Berhasil Diubah');
|
||||||
|
}
|
||||||
|
|
||||||
|
$user->password = $request->password;
|
||||||
if($user->save()){
|
if($user->save()){
|
||||||
return redirect()->route('users.index')->with('success','Data Telah Berhasil Diubah');
|
return redirect()->route('users.index')->with('success','Data Telah Berhasil Diubah');
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,8 @@
|
||||||
<input type="text" name="nama_gelar" id="nama_gelar" class="form-control" placeholder="Masukkan Nama Lengkap Dengan Gelar" value="{{ $users->nama_gelar }}" required>
|
<input type="text" name="nama_gelar" id="nama_gelar" class="form-control" placeholder="Masukkan Nama Lengkap Dengan Gelar" value="{{ $users->nama_gelar }}" required>
|
||||||
<label for="Email">Email</label>
|
<label for="Email">Email</label>
|
||||||
<input type="email" name="email" id="Email" class="form-control" placeholder="Masukkan Email" value="{{ $users->email }}" required>
|
<input type="email" name="email" id="Email" class="form-control" placeholder="Masukkan Email" value="{{ $users->email }}" required>
|
||||||
|
<label for="password">Password</label>
|
||||||
|
<input type="password" name="password" id="password" class="form-control" placeholder="Masukkan password" value="" required>
|
||||||
<label for="ettd">Kode E-TTD</label>
|
<label for="ettd">Kode E-TTD</label>
|
||||||
<input type="text" name="ettd" id="ettd" class="form-control" placeholder="Masukkan Kode E-TTD" value="{{ $users->ettd }}" required>
|
<input type="text" name="ettd" id="ettd" class="form-control" placeholder="Masukkan Kode E-TTD" value="{{ $users->ettd }}" required>
|
||||||
</div>
|
</div>
|
||||||
|
@ -203,6 +205,8 @@
|
||||||
<input type="text" name="nama_gelar" id="nama_gelar" class="form-control" placeholder="Masukkan Nama Lengkap Dengan Gelar" required>
|
<input type="text" name="nama_gelar" id="nama_gelar" class="form-control" placeholder="Masukkan Nama Lengkap Dengan Gelar" required>
|
||||||
<label for="Email">Email</label>
|
<label for="Email">Email</label>
|
||||||
<input type="email" name="email" id="Email" class="form-control" placeholder="Masukkan Email" required>
|
<input type="email" name="email" id="Email" class="form-control" placeholder="Masukkan Email" required>
|
||||||
|
<label for="password">Password</label>
|
||||||
|
<input type="password" name="password" id="password" class="form-control" placeholder="Masukkan Password" required>
|
||||||
<label for="ettd">Kode E-TTD</label>
|
<label for="ettd">Kode E-TTD</label>
|
||||||
<input type="text" name="ettd" id="ettd" class="form-control" placeholder="Masukkan Kode E-TTD" required>
|
<input type="text" name="ettd" id="ettd" class="form-control" placeholder="Masukkan Kode E-TTD" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user