|
- <?php
-
- namespace App\Logics\Shop;
-
- use App\Models\HtpmsCustomer\Deposit\Deposit;
- use App\Models\HtpmsCustomer\Mst\Shop;
- use App\Models\User;
-
- class ShopLogic
- {
-
- private User|null $customerUser = null;
- private Shop|null $shop = null;
-
- public function create(User $customerUser, Shop $shop)
- {
- $this->customerUser = $customerUser;
- $this->shop = $shop;
-
- // チェック処理
-
-
- $shop->save();
-
- // デポジット
- $deposit = new Deposit();
- $deposit->shop_id = $shop->idl;
- $deposit->save();
-
- return $shop;
- }
- }
|