{{-- resources/views/admin/hotels/edit.blade.php --}} {{-- Edit hotel form: pre-filled fields, current image thumbnail, AJAX dropdowns --}} {{-- Controller: Admin\HotelController@edit / @update --}} @extends('layouts.admin') @section('title', 'Edit Hotel') @section('page_title', 'Edit Hotel') @section('page_css') @endsection @section('content') {{-- Category --}} Category Select Category @foreach($categories as $cat) category_id) == $cat->id ? 'selected' : '' }}> {{ $cat->name }} @endforeach @error('category_id') {{ $message }} @enderror {{-- Country --}} Country Select Country @foreach($countries as $country) country_id) == $country->id ? 'selected' : '' }}> {{ $country->name }} @endforeach @error('country_id') {{ $message }} @enderror {{-- Destination (AJAX populated, pre-selected) --}} Destination @if($hotel->destination) {{ $hotel->destination->name }} @else Select Country first @endif @error('destination_id') {{ $message }} @enderror {{-- Name --}} Hotel Name * @error('name') {{ $message }} @enderror {{-- URL --}} Deal URL @error('url') {{ $message }} @enderror {{-- Discount % --}} Discount % @error('discount_percent') {{ $message }} @enderror {{-- Description --}} Description {{ old('description', $hotel->description) }} @error('description') {{ $message }} @enderror {{-- Toggles row --}} Top Deal is_top) ? 'checked' : '' }}> Popular is_popular) ? 'checked' : '' }}> Show on Homepage show_on_homepage) ? 'checked' : '' }}> Show in Header show_in_header) ? 'checked' : '' }}> Status (Active) status) === 'active' ? 'checked' : '' }}> {{-- Image upload with current image preview --}} {{-- Form actions --}} Update Hotel Cancel @endsection @section('page_js') @endsection