32 lines
1.5 KiB
PHP
32 lines
1.5 KiB
PHP
@extends('admin.layouts.app')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
<div class="card-header"><h5>ویرایش شهر: {{ $city->name }}</h5></div>
|
|
<div class="card-body">
|
|
<form action="{{ route('admin.locations.cities.update', $city->id) }}" method="POST">
|
|
@csrf @method('PUT')
|
|
<div class="form-group">
|
|
<label>نام شهر</label>
|
|
<input type="text" name="name" class="form-control @error('name') is-invalid @enderror"
|
|
value="{{ old('name', $city->name) }}">
|
|
@error('name') <span class="text-danger">{{ $message }}</span> @enderror
|
|
</div>
|
|
<div class="form-group">
|
|
<label>استان مربوطه</label>
|
|
<select name="province_id" class="form-control @error('province_id') is-invalid @enderror">
|
|
@foreach($provinces as $province)
|
|
<option
|
|
value="{{ $province->id }}" {{ old('province_id', $city->province_id) == $province->id ? 'selected' : '' }}>
|
|
{{ $province->name }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
@error('province_id') <span class="text-danger">{{ $message }}</span> @enderror
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">بروزرسانی</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@endsection
|