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