LaDo/app/Http/Requests/StorePomoRequest.php

32 lines
724 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StorePomoRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return auth()->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
*/
public function rules(): array
{
return [
'todo_id' => 'required|exists:todos,id',
'pomo_start' => 'required|date',
'pomo_end' => 'required|date',
'notes' => 'nullable|string',
];
}
}