feat: add created_by field handling for flights

This commit is contained in:
2026-08-19 13:31:25 +03:30
parent 700bd38c20
commit 7cf68cc02f
103 changed files with 29226 additions and 18 deletions
+192 -3
View File
@@ -1,3 +1,192 @@
<div>
<!-- Let all your things have their places; let each part of your business have its time. - Benjamin Franklin -->
</div>
@extends('admin.layouts.app')
@section('content')
<div class="container">
<h4 class="mb-4">
ویرایش تور
</h4>
@if($errors->any())
<div class="alert alert-danger">
<ul class="mb-0">
@foreach($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<form action="{{ route('admin.tours.update',$tour) }}"
method="POST"
enctype="multipart/form-data">
@csrf
@method('PUT')
<div class="row">
<div class="col-md-6 mb-3">
<label>عنوان تور</label>
<input type="text"
name="title"
class="form-control"
value="{{ old('title',$tour->title) }}">
</div>
<div class="col-md-6 mb-3">
<label>
نوع سفر
</label>
<select name="travel_type_id"
class="form-control">
<option value="1">
داخلی
</option>
<option value="2">
خارجی
</option>
<option value="3">
چارتر
</option>
</select>
</div>
<div class="col-md-12 mb-3">
<label>خلاصه</label>
<textarea name="summary"
class="form-control"
rows="3">{{ old('summary',$tour->summary) }}</textarea>
</div>
<div class="col-md-12 mb-3">
<label>توضیحات</label>
<textarea name="description"
class="form-control"
rows="5">{{ old('description',$tour->description) }}</textarea>
</div>
<div class="col-md-4 mb-3">
<label>قیمت</label>
<input type="number"
name="price"
class="form-control"
value="{{ old('price',$tour->price) }}">
</div>
<div class="col-md-4 mb-3">
<label>تاریخ حرکت</label>
<input type="text"
name="departure_date"
id="departure_date"
class="form-control"
value="{{ old('departure_date',$tour->departure_date) }}">
</div>
<div class="col-md-4 mb-3">
<label>وضعیت</label>
<select name="status"
class="form-control">
<option value="0"
{{ old('status',$tour->status)==0?'selected':'' }}>
پیش نویس
</option>
<option value="1"
{{ old('status',$tour->status)==1?'selected':'' }}>
فعال
</option>
<option value="2"
{{ old('status',$tour->status)==2?'selected':'' }}>
غیرفعال
</option>
</select>
</div>
<div class="col-md-6 mb-3">
<label>تصویر</label>
<input type="file"
name="image"
class="form-control">
@if($tour->image)
<img src="{{ getImageUrl($tour->image) }}"
width="150"
class="mt-2">
@endif
</div>
</div>
<button class="btn btn-primary">
ذخیره تغییرات
</button>
<a href="{{ route('admin.tours.index') }}"
class="btn btn-secondary">
بازگشت
</a>
</form>
</div>
@endsection