main
Ilham Wara Nugroho 2025-10-14 10:13:36 +07:00
parent d586507bc2
commit a353cc2400
3 changed files with 54 additions and 2 deletions

View File

@ -65,6 +65,8 @@ class ProfileController extends Controller
$sekolah->nama_sekolah = $request->name;
$sekolah->npsn = $request->npsn;
$sekolah->alamat_sekolah = $request->alamat_sekolah;
$sekolah->lat = $request->lat;
$sekolah->long = $request->long;
$sekolah->save();
//profile
@ -77,8 +79,10 @@ class ProfileController extends Controller
$profile->ms_provinsi_id = decode_id($request->provinsi);
$profile->ms_kabupaten_id = decode_id($request->kabupaten);
$profile->ms_kecamatan_id = decode_id($request->kecamatan);
$profile->ms_sekolah_id = $sekolah->MsSekolahId;
$profile->kontak_person = session('kontak_person');
$profile->lat = $request->lat;
$profile->long = $request->long;
$profile->ms_sekolah_id = $sekolah->MsSekolahId;
$profile->kontak_person = session('kontak_person');
$profile->telp = session('telp');
$profile->user_id = auth()->user()->id;
$profile->save();
@ -136,6 +140,8 @@ class ProfileController extends Controller
$profile->alamat_sekolah = $request->alamat_sekolah;
$profile->kontak_person = $request->kontak_person;
$profile->telp = $request->telp;
$profile->lat = $request->lat;
$profile->long = $request->long;
$profile->save();
$user = User::find($keyId);

View File

@ -123,6 +123,30 @@
</div>
<div class="col-12 row mx-auto mt-3">
<div class="col-md-6">
<div class="form-group row">
<label class="col-xl-12 form-label">Latitude</label>
<div class="col-12 pr-1">
<input type="text" value="{{ @$user->profile->lat ? @$user->profile->lat : old('lat')}}" name="lat" class="form-control @error('lat') is-invalid @enderror" placeholder="Masukan Latitude">
<ul id="result"></ul>
@error('lat')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group row">
<label class="col-xl-12 form-label">Longitude</label>
<div class="col-12 pr-1">
<input type="text" value="{{ @$user->profile->long ? @$user->profile->long : old('long')}}" name="long" class="form-control @error('long') is-invalid @enderror" placeholder="Masukan Longitude">
<ul id="result"></ul>
@error('long')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group row">
<label class="col-xl-12 form-label" for="fname">Provinsi</label>

View File

@ -122,6 +122,28 @@
</div>
</div>
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label" for="emailverify">Latitude</label>
<div class="col-12 pr-1">
<input type="text" value="{{@$item->profile->lat ? @$item->profile->lat : old('lat')}}" name="lat" class="form-control @error('lat') is-invalid @enderror" placeholder="Masukan Latitude">
@error('lat')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label" for="emailverify">Longitude</label>
<div class="col-12 pr-1">
<input type="text" value="{{@$item->profile->long ? @$item->profile->long : old('long')}}" name="long" class="form-control @error('long') is-invalid @enderror" placeholder="Masukan longitude">
@error('long')
<span class="invalid-feedback" style="display: block!important;"><strong>{{$message}}</strong></span>
@enderror
</div>
</div>
</div>
<div class="col-12 mb-3">
<div class="form-group">
<label class="col-xl-12 form-label" for="emailverify">Email</label>