You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2KB

  1. <?php
  2. namespace App\Http\Controllers\Web\SeasonTicketContract;
  3. use App\Http\Controllers\Web\WebController;
  4. use App\Kintone\Models\Customer;
  5. use App\Kintone\Models\ParkingRoom;
  6. use App\Kintone\Models\SeasonTicketContract;
  7. use App\Logic\GeneralApplicationManager;
  8. use App\Util\DateUtil;
  9. use Illuminate\Http\JsonResponse;
  10. use Illuminate\Http\Request;
  11. class TerminationOrderOptionsController extends WebController
  12. {
  13. public function name(): string
  14. {
  15. return "定期契約解約申請用オプション取得";
  16. }
  17. public function description(): string
  18. {
  19. return "定期契約解約依頼用のオプションを取得する";
  20. }
  21. public function __construct(protected TerminationOrderOptionsParams $param)
  22. {
  23. parent::__construct();
  24. $this->middleware('auth:sanctum');
  25. }
  26. protected function run(Request $request): JsonResponse
  27. {
  28. $param = $this->param;
  29. $monthes = [];
  30. foreach (range(0, 3) as $m) {
  31. $target = DateUtil::now()->addMonth($m)->endOfMonth();
  32. $monthes[] = $target->format('Y/m/d');
  33. }
  34. return $this->successResponse(['monthes' => $monthes]);
  35. }
  36. }