update pengguna tkr hasone semula
This commit is contained in:
+1
-1
@@ -70,7 +70,7 @@ class User extends Authenticatable
|
||||
|
||||
public function cawangan()
|
||||
{
|
||||
return $this->hasMany(Cawangan::class, 'caw_code' , 'kodcaw');
|
||||
return $this->hasOne(Cawangan::class, 'caw_code' , 'kodcaw');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
<td>{{$key+1}}</td>
|
||||
<td align="left">{{ $value->name }}</td>
|
||||
<td>{{ $value->email }}</td>
|
||||
<td style='white-space:nowrap;'> @foreach ($value->cawangan as $cawuser)
|
||||
{{$cawuser->caw_name}}
|
||||
@endforeach</td>
|
||||
<td style='white-space:nowrap;'> @if($value->cawangan != NULL)
|
||||
{{$value->cawangan->caw_name}}
|
||||
@endif</td>
|
||||
</td>
|
||||
<td>
|
||||
@foreach ($value->roles as $taraf)
|
||||
|
||||
@@ -49,10 +49,11 @@
|
||||
<td style='white-space:nowrap;'>{{ $user->name }}</td>
|
||||
<td>{{ $user->username }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td style='white-space:nowrap;'> @foreach ($user->cawangan as $cawuser)
|
||||
{{$cawuser->caw_name}}
|
||||
@endforeach</td>
|
||||
|
||||
<td style='white-space:nowrap;'>
|
||||
@if($user->cawangan != NULL)
|
||||
{{$user->cawangan->caw_name}}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@foreach ($user->roles as $taraf)
|
||||
<button class="btn btn-primary btn-sm hovernone" disabled>{{$taraf->name}}</button><br>
|
||||
|
||||
@@ -26,9 +26,11 @@
|
||||
<label for="name">Cawangan</label>
|
||||
<select class="custom-select" name="caw" id="caw" required>
|
||||
<option disabled>Pilih Cawangan</option>
|
||||
<option selected value="{{$user->kodcaw}}"> @foreach ($user->cawangan as $cawuser)
|
||||
{{$cawuser->caw_name}} @endforeach</option>
|
||||
|
||||
<option selected value="">-</option>
|
||||
@if($user->cawangan != NULL)
|
||||
<option selected value="{{$user->kodcaw}}">
|
||||
{{$user->cawangan->caw_name}}
|
||||
</option> @endif
|
||||
@foreach ($caw as $item)
|
||||
<option value="{{$item->caw_code}}">{{$item->caw_name}}</option>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user