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/vehicle_models/edit.blade.php
@extends('adminlte::page')

@section('title', 'Dashboard')

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

@section('content')
    <div class="card card-dark">
        <div class="card-header">
            <h3 class="card-title">Edit Vehicle Model</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_vehicle_model" role="form"
            action="{{ route('vehicle_model.update', $vehicle_model->id) }}" class="jqueryValidation">
            @csrf
            @method('PATCH')

            <div class="card-body">
                <div class="form-group">
                    <label for="group">Brand</label>
                    <select class="form-control" name="make_id" id="" required>
                        @foreach ($vehicle_makes as $vehicle_make)
                            <option value="{{ $vehicle_make->id }}"
                                {{ $vehicle_model->make_id == $vehicle_make->id ? 'Selected' : '' }}>
                                {{ $vehicle_make->name }}</option>
                        @endforeach
                    </select>
                </div>

                <div class="form-group">
                    <label for="name">Name</label>
                    <x-adminlte-input class="form-control" id="name" name="name" placeholder="Enter Name"
                        value="{{ old('name') ?? $vehicle_model->name }}" required />
                </div>


                <div class="card-footer d-flex justify-content-end">
                    <a href="{{ route('vehicle_model.index') }}" class="btn btn-danger mx-1">Cancel</a>
                    <button type="submit" class="btn btn-dark mx-1">Update</button>
                </div>
            </div>
        </form>
    </div>
@stop
@push('js')
@endpush