'required|uuid|exists:users_profiles,user_uuid', ]; } /** * @return string[] */ public function messages(): array { return [ 'uuid.required' => 'Es wurde keine UUID übergeben.', 'uuid.uuid' => 'Die übergebene UUID ist ungültig.', 'uuid.exists' => 'Das zu bearbeitende Benutzerprofil existiert nicht.', ]; } /** * @param null $keys * @return array */ public function all($keys = null): array { $data = parent::all($keys); $data['uuid'] = $this->route('uuid'); return $data; } }