--wip-- [skip ci]
This commit is contained in:
parent
83f17eb25b
commit
90d8dd61bc
|
@ -10,6 +10,10 @@ class Member extends Data
|
||||||
public function __construct(
|
public function __construct(
|
||||||
#[MapInputName('vorname')]
|
#[MapInputName('vorname')]
|
||||||
public string $firstname,
|
public string $firstname,
|
||||||
|
#[MapInputName('nachname')]
|
||||||
|
public string $lastname,
|
||||||
|
#[MapInputName('spitzname')]
|
||||||
|
public string $nickname,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,23 @@ class MemberRequestFactory extends RequestFactory
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function withEmptyNames(): self
|
||||||
|
{
|
||||||
|
return $this->state([
|
||||||
|
'vorname' => '',
|
||||||
|
'nachname' => '',
|
||||||
|
'nickname' => '',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
public function toSingleHttp(): FulfilledPromise
|
public function toSingleHttp(): FulfilledPromise
|
||||||
{
|
{
|
||||||
return Http::response($this->create(), 200);
|
return Http::response(json_encode([
|
||||||
|
'success' => true,
|
||||||
|
'message' => null,
|
||||||
|
'title' => null,
|
||||||
|
'data' => $this->create(),
|
||||||
|
'responseType' => null,
|
||||||
|
]), 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue