Files

26 lines
571 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Http\Requests;
use App\Models\Project;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class UpdateProjectRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => ['sometimes', 'string', 'max:255'],
'description' => ['nullable', 'string'],
'status' => ['sometimes', 'string', Rule::in(Project::STATUSES)],
'due_at' => ['nullable', 'date'],
];
}
}