23 lines
460 B
PHP
23 lines
460 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Groups;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class AttachContributorToGroupReleaseRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user() !== null;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'user_id' => ['required', 'integer'],
|
|
'role_label' => ['nullable', 'string', 'max:80'],
|
|
];
|
|
}
|
|
} |