*/ protected $maps = [ DepartaimantCollectionType::current->value => DepartaimantCurrent::class, DepartaimantCollectionType::vintage->value => DepartaimantVintage::class ]; /** * Determine if the user is authorized to make this request. * * @return boolean */ public function authorize(): bool { return Auth::guard('club')->check(); } /** * Prepare the data for validation. * * @return void */ public function prepareForValidation(): void { $this->merge([ 'maps' => $this->maps ]); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'state' => [ Rule::enum(DepartaimantStatus::class) ] ]; } }