EscolaLMS/Consultations

View on GitHub
src/Http/Requests/ReportTermConsultationRequest.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace EscolaLms\Consultations\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class ReportTermConsultationRequest extends FormRequest
{
    public function authorize(): bool
    {
        $user = auth()->user();
        return isset($user);
    }

    public function rules(): array
    {
        return [
            'term' => ['required', 'date', 'after_or_equal:now']
        ];
    }
}