EscolaLMS/Courses

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

Summary

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

namespace EscolaLms\Courses\Http\Requests;

use EscolaLms\Courses\Enum\CoursesPermissionsEnum;
use EscolaLms\Courses\Models\Course;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;

class CourseAssignableUserListRequest extends FormRequest
{
    public function authorize(): bool
    {
        return Gate::allows(CoursesPermissionsEnum::COURSE_CREATE, Course::class);
    }

    public function rules(): array
    {
        return [
            'search' => ['string'],
        ];
    }
}