33 خطوط
974 B
PHP
33 خطوط
974 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreProjectRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'title' => 'required|string|max:255',
|
|
'description' => 'nullable|string',
|
|
'client' => 'nullable|string|max:255',
|
|
'project_manager_id' => 'nullable|exists:users,id',
|
|
'department_id' => 'nullable|exists:departments,id',
|
|
'start_date' => 'nullable|date',
|
|
'end_date' => 'nullable|date|after_or_equal:start_date',
|
|
'priority' => 'nullable|string|max:50',
|
|
'status' => 'nullable|string|max:50',
|
|
'risk_level' => 'nullable|string|max:50',
|
|
'budget' => 'nullable|numeric',
|
|
'estimated_hours' => 'nullable|numeric',
|
|
'actual_hours' => 'nullable|numeric',
|
|
];
|
|
}
|
|
}
|