暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

update.blade.php 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @extends('admin.layouts.app')
  2. @section('content')
  3. <div class="card shadow">
  4. <div class="card-header bg-transparent">
  5. <div class="row align-items-center">
  6. <div class="col">
  7. <h6 class="text-uppercase text-muted ls-1 mb-1">{{ $sub_header }}</h6>
  8. <h2 class="mb-0">{{ $header }} Update</h2>
  9. </div>
  10. </div>
  11. </div>
  12. <div class="card-body">
  13. <form action="{{ route($route.'update_action') }}" class="form-global-handle" method="POST" enctype="multipart/form-data">
  14. @csrf
  15. <div class="form-group">
  16. <input type="hidden" name="id" value="{{ Hashids::encode($data->id) }}">
  17. <label for="nama"> Nama <span class="text-danger">*</span> </label>
  18. <input type="text" name="nama" value="{{ $data->nama }}" class="form-control" required id="nama" >
  19. </div>
  20. <div class="form-group">
  21. <label for="type_alat_id"> Tipe Alat <span class="text-danger">*</span> </label>
  22. <select name="type_alat_id" id="type_alat_id" class="global-select2 form-control" link="globalfetch" t="{{encrypt('master_type_alats')}}" s="{{encrypt('id,nama')}}">
  23. <option value="{{ $data->type_alat_id }}">{{ $data->type_alat->nama }}</option>
  24. </select>
  25. </div>
  26. <div class="form-group">
  27. <div class="row">
  28. <div class="col-md-2">
  29. @php $path = Storage::url('public/images/'.$data->gambar); @endphp
  30. <img src="{{$path}}" alt="..." class="img-thumbnail" style="width:100px">
  31. </div>
  32. <div class="col-md-10">
  33. <label for="deskripsi"> Gambar (Ganti Foto)</label>
  34. <input type="file" name="gambar" id="" class="form-control">
  35. </div>
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label for="deskripsi"> Deskripsi <span class="text-danger">*</span> </label>
  40. <textarea name="deskripsi" id="" class="form-control">{{ $data->deskripsi }}</textarea>
  41. </div>
  42. <div class="form-group">
  43. <button type="submit" class="btn btn-success">Simpan</button>
  44. <a class="btn btn-default bg-back" href="{{ route($route.'index') }}">Kembali</a>
  45. </div>
  46. </form>
  47. </div>
  48. </div>
  49. @endsection
  50. {{-- load JS yang lu perluin, selain itu no --}}
  51. @push('js')
  52. <script src="{{ asset('assets') }}/js/blockUI.js"></script>
  53. <script src="{{ asset('assets') }}/js/sweetalert2.js"></script>
  54. <script src="{{ asset('assets') }}/js/custom.js"></script>
  55. <script src="{{ asset('assets') }}/vendor/datetimepicker/moment.min.js"></script>
  56. <script src="{{ asset('assets') }}/vendor/datetimepicker/tempusdominus-bootstrap-4.min.js"></script>
  57. @endpush