@extends('backend.layouts_backend.master') @section('title') All Tours @endsection @section('extra_styles') @endsection @section('content')
Update Tour
@can('tour-create') Update Tour @endcan
@can('tour-restore') Trashed Tours @endcan
@csrf @method('PATCH')
@error('name') {{ $message }} @enderror
@error('destination') {{ $message }} @enderror
@error('start_date') {{ $message }} @enderror
@error('end_date') {{ $message }} @enderror
@error('tour_category_id') {{ $message }} @enderror
@error('⁠⁠featured_photo') {{ $message }} @enderror

preview
{{-- start multiple column --}}
{{-- col-1 --}}
@error('tour_single_cost') {{ $message }} @enderror
{{-- col-2 --}}
@error('tour_couple_cost') {{ $message }} @enderror
{{-- end multiple column --}} {{-- start multiple column --}}
{{-- col-1 --}}
tour_status == '1' ? 'checked' : '' }} value="1">
tour_status == '0' ? 'checked' : '' }} value="0">
{{-- validation --}} @error('tour_status') {{ $message }} @enderror
{{-- col-2 --}}
booking_status == '1' ? 'checked' : '' }} value="1">
booking_status == '0' ? 'checked' : '' }} value="0">
{{-- validation --}} @error('booking_status') {{ $message }} @enderror
{{-- end multiple column --}}

{{-- end multiple column --}} {{-- itenaries --}}
@php $tour_itenaries = !empty($tour->tour_itenaries) ? json_decode($tour->tour_itenaries, true) : []; @endphp
UPDATE ITENARY ( ADD MULTIPLE )

{{-- alert delete item --}} @if (session('messagedelete')) {{--
{{ session('messagedelete')}}
--}} @endif
{{-- itenary add --}} {{--
@forelse($tour_itenaries as $key => $tour_itenary)
@empty No itenaries found @endforelse
--}} {{-- end itenary add --}} @if (!empty($tour_itenaries)) @foreach ($tour_itenaries as $key => $tour_itenary) @endforeach @else @endif
Day Number Time Description
{{-- Add Itenary --}}
{{-- activities --}}
UPDATE ACTIVITY ( UPDATE MULTIPLE )

{{-- activity update --}}
{{-- fetch existing activities --}} @forelse(json_decode($tour->tour_activities, true) ?? [] as $index => $tour_activity) {{-- delete activity --}}
@empty No activity found @endforelse {{-- end fetch existing activities --}}
{{-- end itenary add --}}
{{-- Tour includes and excludes --}} {{-- tour includes --}}
UPDATE TOUR INCLUDES ( UPDATE MULTIPLE )

@forelse(json_decode($tour->tour_includes, true) ?? [] as $index => $tour_include)
{{-- Fetch existing tour includes --}}
{{-- end fetch existing tour includes --}}
@empty No includes @endforelse
{{-- end itenary add --}}
{{-- tour excludes --}}
TOUR EXCLUDES ( ADD MULTIPLE )

{{-- fetch existing tour excludes --}} @forelse(json_decode($tour->tour_excludes, true) ?? [] as $index => $tour_exclude)
@empty No tour excludes @endforelse {{-- end of existing tour excludes --}}
{{-- end itenary add --}}
@error('video_url') {{ $message }} @enderror
@error('slots_available') {{ $message }} @enderror

{{-- end multiple column --}} {{-- photo library upload --}}
Update Tour photos gallery
{{-- validation --}} @error('photo_library') {{ $message }} @enderror
{{-- pick multiple images from array --}} @if (!empty($tour->photo_library)) @foreach (is_null($tour->photo_library) ? [] : explode(',', $tour->photo_library) as $image) {{-- START COL --}} {{-- END COL --}} @endforeach @else
No Photos Available
@endif {{-- end pick multiple images from array --}}
{{-- --}}
{{-- end of photo library upload --}} {{-- description --}}
@error('description') {{ $message }} @enderror
@endsection @section('extra_scripts') {{-- add itenary row and delete itenary row --}} {{-- --}} {{-- --}} {{-- add activity row and delete activity row --}} {{-- --}} {{-- tour excludes , add and remove rows --}} {{-- tour includes , add and remove rows --}} {{-- multiple photo upload - environmental activities script --}} {{-- end of multiple photo upload - environmental activities script --}} {{-- add tour activity --}} {{-- add tour itenary row --}} @endsection