<?php

namespace App\Modules\HR\Recruitment\Requests;

use App\Modules\HR\Recruitment\Models\RecruitmentOfferLetter;

class UpdateOfferLetterRequest extends StoreOfferLetterRequest
{
    public function authorize(): bool
    {
        $row = $this->route('offer_letter');

        return $row instanceof RecruitmentOfferLetter
            && ($this->user()?->can('update', $row) ?? false);
    }
}
