64 lines
3.6 KiB
PHP
64 lines
3.6 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'Add Car')
|
|
|
|
@section('content')
|
|
<div class="mb-8">
|
|
<a href="{{ route('cars.index') }}" class="text-blue-600 hover:text-blue-800 flex items-center gap-2 mb-4">
|
|
<i class="fas fa-arrow-left"></i> Back to Fleet
|
|
</a>
|
|
<h2 class="text-3xl font-bold text-gray-800">Add New Car</h2>
|
|
<p class="text-gray-500">Add a new car to your fleet</p>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-2xl shadow-sm border border-gray-200 p-8">
|
|
<form action="{{ route('cars.store') }}" method="POST">
|
|
@csrf
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Brand</label>
|
|
<input type="text" name="brand" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Model</label>
|
|
<input type="text" name="model" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Year</label>
|
|
<input type="text" name="year" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">License Plate</label>
|
|
<input type="text" name="license_plate" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Color</label>
|
|
<input type="text" name="color" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Daily Rate (BHD)</label>
|
|
<input type="number" name="daily_rate" step="0.01" required class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Status</label>
|
|
<select name="status" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
<option value="available">Available</option>
|
|
<option value="maintenance">Maintenance</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Mileage</label>
|
|
<input type="number" name="mileage" value="0" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
<div class="md:col-span-2">
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Notes</label>
|
|
<textarea name="notes" rows="3" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="mt-6">
|
|
<button type="submit" class="bg-blue-600 text-white px-8 py-3 rounded-xl hover:bg-blue-700">Add Car</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
@endsection
|