'required|uuid|exists:forums,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' => 'Das zu bearbeitende Forum existiert nicht.' ]; } /** * @param array $keys * @return array */ public function all($keys = []): array { $data = parent::all($keys); $data['uuid'] = $this->route('uuid'); return $data; } }