Files
sam-api/app/Http/Requests/Attendance/CheckInRequest.php

26 lines
612 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Http\Requests\Attendance;
use Illuminate\Foundation\Http\FormRequest;
class CheckInRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'user_id' => 'nullable|integer|exists:users,id',
'check_in' => 'nullable|date_format:H:i:s',
'gps_data' => 'nullable|array',
'gps_data.latitude' => 'nullable|numeric',
'gps_data.longitude' => 'nullable|numeric',
'gps_data.accuracy' => 'nullable|numeric',
];
}
}