schneespur/app/Http/Requests/Admin/StoreVehicleRequest.php
Michael 2c63440ed8 Revert: move code back to project root from schneespur/ subdirectory
- Reverts the schneespur/ subdirectory restructure (b8e426b)
- Restores package.json and vite.config.js (needed for npm build, were
  removed in an earlier cleanup before the restructure)
- Updates public/build/ assets with current Vite output (new content hashes)
2026-05-17 18:24:26 +00:00

40 lines
1 KiB
PHP

<?php
namespace App\Http\Requests\Admin;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class StoreVehicleRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:200'],
'license_plate' => ['nullable', 'string', 'max:32'],
'owntracks_device_id' => ['nullable', 'string', 'max:64', 'unique:vehicles,owntracks_device_id'],
'notes' => ['nullable', 'string'],
];
}
/**
* @return array<string, string>
*/
public function attributes(): array
{
return [
'name' => __('vehicle.field_name'),
'license_plate' => __('vehicle.field_license_plate'),
'owntracks_device_id' => __('vehicle.field_owntracks_device_id'),
'notes' => __('vehicle.field_notes'),
];
}
}