HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/orbidirectory.com/resources/views/admin/website/edit.blade.php
@extends('adminlte::page')

@section('title', 'Dashboard')

@section('content_header')
    <h1>Website</h1>
    {{-- <small>Manage Website</small> --}}
@stop

@section('content')
    <div class="card card-dark">
        <div class="card-header">
            <h3 class="card-title">Edit Website</h3>
        </div>
        {{-- @if (session('error'))
            <h6 class="alert alert-danger">
                {{ session('error') }}
            </h6>
        @endif
        @if ($errors->any())
            <div class="alert alert-danger">
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
        @endif --}}
        <form method="POST" id="edit_website" role="form" action="{{ route('website.update', $website->id) }}"
            enctype="multipart/form-data" class="jqueryValidation">
            @csrf
            @method('PATCH')
            <div class="card-body">
                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="group">Transporter</label>
                        <select class="form-control" name="user_id" required>
                            <option value="">--Select--</option>
                            @foreach ($transporters as $key)
                                <option value="{{ $key->id }}" {{ $website->user_id == $key->id ? 'Selected' : '' }}>
                                    {{ $key->name }}</option>
                            @endforeach
                        </select>
                    </div>

                    <div class="col-md-6">
                        <label for="subdomain">Subdomain</label>
                        <input type="text" class="form-control" id="subdomain" name="subdomain"
                            placeholder="Enter Subdomain" value="{{ old('subdomain', $website->subdomain ?? '') }}"
                            required />
                    </div>
                </div>
                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="website_logo">Website Logo</label>
                        <x-adminlte-input class="form-control" id="website_logo" name="website_logo" type="file"
                            placeholder="Upload new Website logo" />
                        @if ($website->getFirstMedia('website_logo'))
                            <div class="mb-2">
                                <!-- Display the current logo -->
                                <img src="{{ $website->getFirstMediaUrl('website_logo') }}" alt="Website Logo"
                                    width="100">
                            </div>
                        @endif
                    </div>

                    <div class="col-md-6">
                        <label for="website_favicon">Website Favicon</label>
                        <x-adminlte-input class="form-control" id="website_favicon" name="website_favicon" type="file"
                            placeholder="Upload new   Website Favicon" />
                        @if ($website->getFirstMedia('website_favicon'))
                            <div>
                                <!-- Display the current logo -->
                                <img src="{{ $website->getFirstMediaUrl('website_favicon') }}" alt="website_favicon"
                                    width="100">
                            </div>
                        @endif

                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="banner_image">Banner Image</label>
                        <x-adminlte-input class="form-control" id="banner_image" name="banner_image" type="file"
                            placeholder="Upload new  Banner Image" />
                        @if ($website->getFirstMedia('banner_image'))
                            <div>
                                <!-- Display the current logo -->
                                <img src="{{ $website->getFirstMediaUrl('banner_image') }}" alt="banner_image"
                                    width="100">
                            </div>
                        @endif
                    </div>
                    <div class="col-md-6">
                        <label for="website_footer_logo">Website Footer Logo</label>
                        <x-adminlte-input class="form-control" id="website_footer_logo" name="website_footer_logo"
                            type="file" placeholder="Upload new  Website Footer Logo" />
                        @if ($website->getFirstMedia('website_footer_logo'))
                            <div>
                                <!-- Display the current logo -->
                                <img src="{{ $website->getFirstMediaUrl('website_footer_logo') }}" alt="website_footer_logo"
                                    width="100">
                            </div>
                        @endif

                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="driver_picture">Driver Picture</label>
                        <x-adminlte-input class="form-control" id="driver_picture" name="driver_picture" type="file"
                            placeholder="Upload new Driver Picture" />
                        @if ($website->getFirstMedia('driver_picture'))
                            <div>
                                <!-- Display the current logo -->
                                <img src="{{ $website->getFirstMediaUrl('driver_picture') }}" alt="driver_picture"
                                    width="100">
                            </div>
                        @endif

                    </div>
                    <div class="col-md-6">
                        <label for="website_video">Website Video</label>
                        <input type="file" name="website_video" id="website_video" class="form-control"
                            placeholder="Upload new Driver video" />
                        @if ($website->getFirstMedia('website_video'))
                            <div class="mb-3">
                                <video width="150" height="100" controls>
                                    <source src="{{ $website->getFirstMediaUrl('website_video') }}" type="video/mp4">
                                    Your browser does not support the video tag.
                                </video>
                            </div>
                        @endif
                    </div>
                </div>
                <div class="form-group row">
                    <div class="col-md-3">
                        <label for="name">Name</label>
                        <input type="text" class="form-control" id="name" name="name" placeholder="Enter Name"
                            value="{{ old('name', $website->name ?? '') }}" required />
                    </div>
                    <div class="col-md-3">
                        <label for="email">Email</label>
                        <x-adminlte-input type="email" class="form-control" id="email" name="email"
                            placeholder="Enter Email" value="{{ old('email', $website->email ?? '') }}" />
                    </div>
                    <div class="col-md-3">
                        <label for="phone">Phone Number</label>
                        <x-adminlte-input type="number" class="form-control" id="phone" name="phone_number"
                            placeholder="Enter Phone Number"
                            value="{{ old('phone_number', $website->phone_number ?? '') }}" required />
                    </div>

                    <div class="col-md-3">
                        <label for="whatsapp_number">Whatsapp Number</label>
                        <x-adminlte-input type="number" class="form-control" id="whatsapp_number"
                            name="whatsapp_number" placeholder="Enter Whatsapp Number"
                            value="{{ old('whatsapp_number', $website->whatsapp_number ?? '') }}" />
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-3">
                        <label for="dob">Date of Birth</label>
                        <input type="text" class="form-control datepicker" id="dob" name="dob"
                            placeholder="yyyy-mm-dd" value="{{ old('dob', $website->dob ?? '') }}" required>
                    </div>

                    <div class="col-md-3">
                        <label for="country">Select your Country</label>
                        <select name="country" id="country" class="form-control select2 " required>
                            <option value="">Select Country</option>
                            @foreach ($countries as $key => $value)
                                <option value="{{ $value->id }}"
                                    {{ $website->country_id == $value->id ? 'Selected' : '' }}>{{ $value->name }}
                                </option>
                            @endforeach
                        </select>
                    </div>
                    <div class="col-md-3">
                        <label for="state">Select your State</label>
                        <select name="state" id="state" class="form-control select2">
                            @foreach ($states as $state)
                                <option value="{{ $state->id }}"
                                    {{ $website->state_id == $state->id ? 'selected' : '' }}>
                                    {{ $state->name }}
                                </option>
                            @endforeach
                        </select>
                    </div>
                    <div class="col-md-3">
                        <label for="city">Select your City</label>
                        <select name="city" id="city" class="form-control select2">
                            @foreach ($cities as $city)
                                <option value="{{ $city->id }}"
                                    {{ $website->city_id == $city->id ? 'selected' : '' }}>
                                    {{ $city->name }}
                                </option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="zip_code">Zip Code</label>
                        <x-adminlte-input type=" form-control " class="form-control" id="zip_code" name="zip_code"
                            placeholder="Enter Zip Code" value="{{ old('zip_code', $website->zip_code ?? '') }}"
                            required />
                    </div>
                    <div class="col-md-6">
                        <label for="address_line_1">Address Line 1</label>
                        <x-adminlte-input class="form-control" id="address_line_1" name="address_line_1"
                            placeholder="Enter Address Line 1"
                            value="{{ old('address_line_1', $website->address_line_1 ?? '') }}" required />
                    </div>
                </div>
                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="address_line_2">Address Line 2</label>
                        <x-adminlte-input class="form-control" id="address_line_2" name="address_line_2"
                            placeholder="Enter Address Line 2"
                            value="{{ old('address_line_2', $website->address_line_2 ?? '') }}" />
                    </div>

                    <div class="col-md-6">
                        <label for="about_heading">Heading</label>
                        <input type="text" class="form-control" id="about_heading" name="about_heading"
                            placeholder="Enter Heading" value="{{ old('about_heading', $website->about_heading ?? '') }}"
                            required />
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="description">Description</label>
                        <x-adminlte-textarea class="form-control" id="description" name="description"
                            placeholder="Enter Description" required>
                            {{ old('description', $website->about_description ?? '') }}
                        </x-adminlte-textarea>
                    </div>

                    <div class="col-md-6">
                        <label for="banner_subheading">Banner Subheading</label>
                        <input type="text" class="form-control" id="banner_subheading" name="banner_subheading"
                            placeholder="Enter Banner Subheading"
                            value="{{ old('banner_subheading', $website->banner_subheading ?? '') }}" required />
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="banner_heading">Banner Heading</label>
                        <input type="text" class="form-control" id="banner_heading" name="banner_heading"
                            placeholder="Enter Banner Heading"
                            value="{{ old('banner_heading', $website->banner_heading ?? '') }}" required />
                    </div>

                    <div class="col-md-6">
                        <label for="banner_description">Banner Description</label>
                        <x-adminlte-textarea class="form-control" id="banner_description" name="banner_description"
                            placeholder="Enter Banner Description" required>
                            {{ old('banner_description', $website->banner_description ?? '') }}
                        </x-adminlte-textarea>
                    </div>
                </div>
                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="start_year">Start Year</label>
                        <select id="start_year" name="start_year" class="form-control" required>
                            <option value="">--Select--</option>
                            @for ($year = date('Y'); $year >= 1900; $year--)
                                <option value="{{ $year }}"
                                    {{ old('start_year', $website->start_year ?? '') == $year ? 'selected' : '' }}>
                                    {{ $year }}
                                </option>
                            @endfor
                        </select>
                    </div>

                    <div class="col-md-6">
                        <label for="happy_customers">Happy Customers</label>
                        <x-adminlte-input type="number" class="form-control" id="happy_customers"
                            name="happy_customers" placeholder="Enter Number of Happy Customers"
                            value="{{ old('happy_customers', $website->happy_customers ?? '') }}" required />
                    </div>
                </div>


                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="customer_rating">Customer Rating (out of 10)</label>
                        <x-adminlte-input type="number" class="form-control" id="customer_rating"
                            name="customer_rating" placeholder="Enter Customer Rating"
                            value="{{ old('customer_rating', $website->customer_rating ?? '') }}" min="0"
                            max="10" required />
                    </div>
                    <div class="col-md-6">
                        <label for="driving_skills">Driving Skills (in %)</label>
                        <x-adminlte-input type="number" class="form-control" id="driving_skills" name="driving_skills"
                            placeholder="Enter Driving Skills in Percent"
                            value="{{ old('driving_skills', $website->driving_skills ?? '') }}" min="0"
                            max="100" required />
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="vehicle_maintenance_skills">Vehicle Maintenance Skills (in %)</label>
                        <x-adminlte-input type="number" class="form-control" id="vehicle_maintenance_skills"
                            name="vehicle_maintenance_skills" placeholder="Enter Vehicle Maintenance Skills in Percent"
                            value="{{ old('vehicle_maintenance_skills', $website->vehicle_maintenance_skills ?? '') }}"
                            min="0" max="100" required />
                    </div>
                    <div class="col-md-6">
                        <label for="navigation_skills">Navigation Skills (in %)</label>
                        <x-adminlte-input type="number" class="form-control" id="navigation_skills"
                            name="navigation_skills" placeholder="Enter Navigation Skills in Percent"
                            value="{{ old('navigation_skills', $website->navigation_skills ?? '') }}" min="0"
                            max="100" required />
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="time_management">Time Management (in %)</label>
                        <x-adminlte-input type="number" class="form-control" id="time_management"
                            name="time_management" placeholder="Enter Time Management in Percent"
                            value="{{ old('time_management', $website->time_management ?? '') }}" min="0"
                            max="100" required />
                    </div>
                    <div class="col-md-6">
                        <label for="additional_skills_desc">Additional Skill Description</label>
                        <x-adminlte-textarea class="form-control" id="additional_skills_desc"
                            name="additional_skills_desc" placeholder="Enter Additional Skill Description" required>
                            {{ old('additional_skills_desc', $website->additional_skills_desc ?? '') }}
                        </x-adminlte-textarea>
                    </div>
                </div>
                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="booking_form_heading">Booking Form Heading</label>
                        <input type="text" class="form-control" id="booking_form_heading" name="booking_form_heading"
                            placeholder="Enter Heading"
                            value="{{ old('booking_form_heading', $website->booking_form_heading ?? '') }}" required />
                    </div>
                    <div class="col-md-6">
                        <label for="booking_form_desc">Booking Form Description</label>
                        <x-adminlte-textarea class="form-control" id="booking_form_desc" name="booking_form_desc"
                            placeholder="Enter Additional Skill Description" required>
                            {{ old('booking_form_desc', $website->booking_form_desc ?? '') }}
                        </x-adminlte-textarea>
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="why_choose_heading">Why Choose Heading</label>
                        <input type="text" class="form-control" id="why_choose_heading" name="why_choose_heading"
                            placeholder="Enter Why Choose Heading"
                            value="{{ old('why_choose_heading', $website->why_choose_heading ?? '') }}" required />
                    </div>

                    <div class="col-md-6">
                        <label for="why_choose_small_image">Why Choose Small Imagee</label>
                        <x-adminlte-input class="form-control" id="why_choose_small_image" name="why_choose_small_image"
                            type="file" placeholder="Upload new Why Choose Small Image" />
                        @if ($website->getFirstMedia('why_choose_small_image'))
                            <div>
                                <!-- Display the current logo -->
                                <img src="{{ $website->getFirstMediaUrl('why_choose_small_image') }}"
                                    alt="why_choose_small_image" width="100">
                            </div>
                        @endif

                    </div>
                </div>


                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="why_choose_desc">Why Choose Description</label>
                        <x-adminlte-textarea class="form-control" id="why_choose_desc" name="why_choose_desc"
                            placeholder="Enter Why Choose Description" required>
                            {{ old('why_choose_desc', $website->why_choose_desc ?? '') }}
                        </x-adminlte-textarea>
                    </div>


                    <div class="col-md-6">
                        <label for="why_choose_big_image">Choose Big Imagee</label>
                        <x-adminlte-input class="form-control" id="why_choose_big_image" name="why_choose_big_image"
                            type="file" placeholder="Upload new Why Choose Big Image" />
                        @if ($website->getFirstMedia('why_choose_big_image'))
                            <div>
                                <!-- Display the current logo -->
                                <img src="{{ $website->getFirstMediaUrl('why_choose_big_image') }}"
                                    alt="why_choose_big_image" width="100">
                            </div>
                        @endif

                    </div>
                </div>


                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="service_heading">Service Heading</label>
                        <input type="text" class="form-control" id="service_heading" name="service_heading"
                            placeholder="Enter Service Heading"
                            value="{{ old('service_heading', $website->service_heading ?? '') }}" required />
                    </div>

                    <div class="col-md-6">
                        <label for="service_desc">Service Description</label>
                        <x-adminlte-textarea class="form-control" id="service_desc" name="service_desc"
                            placeholder="Enter Service Description" required>
                            {{ old('service_desc', $website->service_desc ?? '') }}
                        </x-adminlte-textarea>
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="footer_description">Footer Description</label>
                        <x-adminlte-textarea class="form-control" id="footer_description" name="footer_description"
                            placeholder="Enter Footer Description" required>
                            {{ old('footer_description', $website->footer_description ?? '') }}
                        </x-adminlte-textarea>
                    </div>
                    <div class="col-md-6">
                        <label for="facebook_url">Facebook URL</label>
                        <x-adminlte-input type="url" class="form-control" id="facebook_url" name="facebook_url"
                            placeholder="Enter Facebook URL"
                            value="{{ old('facebook_url', $website->facebook_url ?? '') }}" />
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="instagram_url">Instagram URL</label>
                        <x-adminlte-input type="url" class="form-control" id="instagram_url" name="instagram_url"
                            placeholder="Enter Instagram URL"
                            value="{{ old('instagram_url', $website->instagram_url ?? '') }}" />
                    </div>

                    <div class="col-md-6">
                        <label for="linkedin_url">LinkedIn URL</label>
                        <x-adminlte-input type="url" class="form-control" id="linkedin_url" name="linkedin_url"
                            placeholder="Enter LinkedIn URL"
                            value="{{ old('linkedin_url', $website->linkedin_url ?? '') }}" />
                    </div>
                </div>

                <div class="form-group row">
                    <div class="col-md-6">
                        <label for="twitter_url">Twitter URL</label>
                        <x-adminlte-input type="url" class="form-control" id="twitter_url" name="twitter_url"
                            placeholder="Enter Twitter URL"
                            value="{{ old('twitter_url', $website->twitter_url ?? '') }}" />
                    </div>
                    <div class="col-md-6">
                        <label for="status">Status</label>
                        <select name="status" id="status" class="form-control" required>

                            @foreach (App\Models\Website::status as $key => $status)
                                <option value="{{ $key }}" {{ $website->status == $key ? 'selected' : '' }}>
                                    {{ $status }}</option>
                            @endforeach
                        </select>
                    </div>
                </div>

                <div class="card-footer d-flex justify-content-end">
                    <a href="{{ route('website.index') }}" class="btn btn-danger mx-1">Cancel</a>
                    <button type="submit" class="btn btn-dark mx-1">Submit</button>
                </div>
            </div>
        </form>
    </div>
@stop
@push('js')
    {{-- country-state-city --}}
    <script type="text/javascript">
        $(document).ready(function() {

            //Initialize Select2 Elements
            $('.select2').select2();


            $('select[name="country"]').on('change', function() {
                // alert(" {{ url('/getStates') }} / + country_id ");
                var country_id = $(this).val();
                // alert("{{ '/getStates' }}/" + country_id);

                if (country_id) {
                    $.ajax({
                        url: "{{ route('states.get', '') }}/" + country_id,
                        type: "GET",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            $('select[name="state"]').empty();
                            $.each(data, function(key, value) {
                                $('select[name="state"]').append(
                                    '<option value="' +
                                    key + '">' +
                                    value + '</option>');
                            });
                        }
                    });
                } else {
                    $('select[name="state"]').empty();
                }
            });
            $('select[name="state"]').on('change', function() {
                var state_id = $(this).val();
                if (state_id) {
                    $.ajax({
                        url: "{{ route('city.get', '') }}/" + state_id,
                        type: "GET",
                        dataType: "json",
                        success: function(data) {
                            console.log(data);
                            $('select[name="city"]').empty();
                            $.each(data, function(key, value) {
                                $('select[name="city"]').append(
                                    '<option value="' +
                                    key + '">' +
                                    value + '</option>');
                            });
                        }
                    });
                } else {
                    $('select[name="city"]').empty();
                }
            });
        });
        // {{-- End country-state-city --}}
    </script>
    <!-- Datepicker initialization script -->
    <script>
        $(function() {
            $('.datepicker').datepicker({
                dateFormat: 'yy-mm-dd', // Date format
                changeMonth: true,
                changeYear: true,
                yearRange: "-100:+0", // Range of years
            });
        });
    </script>
@endpush