No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

44 líneas
1.1KB

  1. <?php
  2. namespace App\Http\Controllers\Web\QRService\Group;
  3. use App\Http\Controllers\Web\WebController;
  4. use App\Logics\QRService\QRServiceParkingGroupLogic;
  5. use App\Models\HtpmsCustomer\Existing\Parking;
  6. use App\Models\HtpmsCustomer\QRService\ServiceParkingGroup;
  7. use Illuminate\Http\JsonResponse;
  8. use Illuminate\Http\Request;
  9. class QRServiceGroupRemoveController extends WebController
  10. {
  11. public function name(): string
  12. {
  13. return "QRサービス券駐車場グループ駐車場削除";
  14. }
  15. public function description(): string
  16. {
  17. return "QRサービス券駐車場グループへ駐車場を削除する";
  18. }
  19. public function __construct(protected QRServiceGroupRemoveParam $param)
  20. {
  21. parent::__construct();
  22. }
  23. protected function run(Request $request): JsonResponse
  24. {
  25. $param = $this->param;
  26. $group = ServiceParkingGroup::findOrFail($param->id);
  27. $parking = Parking::whereParkCode($param->parkingManagementCode)
  28. ->firstOrFail();
  29. QRServiceParkingGroupLogic::remove($group, $parking);
  30. return $this->successResponse();
  31. }
  32. }