merge([ 'id' => Str::slug($this->name), ]); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { return [ 'id' => 'required|string|min:2|max:25', 'name' => 'required|string|min:2|max:25', ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes(): array { return [ 'name' => trans('validation.attributes.name'), ]; } }