<?php

namespace App\Http\Requests\Admin\Manage\CourseRegistration;

use Illuminate\Foundation\Http\FormRequest;

class SignAsAdvisorCourseRegistrationRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()->isAdvisorOf($this->route('student'));
    }

    public function rules(): array
    {
        return [
            'signature' => ['required', 'file', 'image', 'max:2048'],
        ];
    }
}
