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.

33 line
595B

  1. <?php
  2. namespace App\Logics\Shop;
  3. use App\Models\HtpmsCustomer\Deposit\Deposit;
  4. use App\Models\HtpmsCustomer\Mst\Shop;
  5. use App\Models\User;
  6. class ShopLogic
  7. {
  8. private User|null $customerUser = null;
  9. private Shop|null $shop = null;
  10. public function create(User $customerUser, Shop $shop)
  11. {
  12. $this->customerUser = $customerUser;
  13. $this->shop = $shop;
  14. // チェック処理
  15. $shop->save();
  16. // デポジット
  17. $deposit = new Deposit();
  18. $deposit->shop_id = $shop->id;
  19. $deposit->save();
  20. return $shop;
  21. }
  22. }