Slide 42
Slide 42 text
ユースケース実行
Action
クラスでユースケース実行
$customerId = filter_var(
$request->json('customer_id'), FILTER_VALIDATE_INT);
$addPoint = filter_var(
$request->json('add_point'), FILTER_VALIDATE_INT);
//
ユースケースクラスを実行
$customerPoint = $this->useCase->run(
$customerId,
$addPoint
);
return response()->json(
['customer_point' => $customerPoint]);
42