| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace App\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- class StoreReclamationRequest extends FormRequest
- {
- /**
- * Determine if the user is authorized to make this request.
- */
- public function authorize(): bool
- {
- return hasRole('admin,manager');
- }
- /**
- * Get the validation rules that apply to the request.
- *
- * @return array
- */
- public function rules(): array
- {
- return [
- 'user_id' => 'required|exists:users,id',
- 'status_id' => 'required|exists:reclamation_statuses,id',
- 'reason' => 'nullable|string',
- 'guarantee' => 'nullable|string',
- 'whats_done' => 'nullable|string',
- 'create_date' => 'required|date',
- 'finish_date' => 'required|date',
- 'start_work_date' => 'nullable|date',
- 'work_days' => 'nullable|integer',
- 'brigadier_id' => 'nullable|exists:users,id',
- ];
- }
- }
|