value); } public function failedAuthorizationMessage(): string { if (!is_user_logged_in()) { return 'You must be logged in to move the portal.'; } return 'You do not have permission to move the portal.'; } public function rules() { return [ 'slug' => ['required', 'string', 'max:200'], ]; } public function messages() { return [ 'slug.required' => __('Slug is required.', 'bit-connect'), ]; } public function sanitizedSlug(): string { return sanitize_title((string) $this->slug); } }