noble/resources/views/region/edit.blade.php
2023-05-16 15:54:23 +03:00

45 lines
1.6 KiB
PHP
Executable File

@extends('layout.master')
@section('content')
<div class="container mt-2">
<div class="row">
<div class="col-lg-12 margin-tb">
<div class="pull-left">
<h2>Edit Region</h2>
</div>
<div class="pull-right">
<a class="btn btn-primary" href="{{ route('regions.index') }}" enctype="multipart/form-data">
Back</a>
</div>
</div>
</div>
@if(session('status'))
<div class="alert alert-success mb-1 mt-1">
{{ session('status') }}
</div>
@endif
<form action="{{ route('regions.update',$region->id) }}" method="POST" enctype="multipart/form-data">
@csrf
@method('PUT')
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group">
<label class="form-label">Country id:</label>
<select class="form-select mb-2" name="country_id">
<option>Select Country</option>
@foreach($countries as $country)
<option value="{{$country->id}}" {{$country->id == $region->country_id ? 'selected' : ''}}>{{$country->id}}</option>
@endforeach
</select>
@error('country_id')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
</div>
<button type="submit" class="btn btn-primary ml-3">Submit</button>
</div>
</form>
</div>
@endsection