diff --git a/packages/TPS/API/Http/Resources/Catalog/Category.php b/packages/TPS/API/Http/Resources/Catalog/Category.php index b740a9d37..a65bfb3d4 100644 --- a/packages/TPS/API/Http/Resources/Catalog/Category.php +++ b/packages/TPS/API/Http/Resources/Catalog/Category.php @@ -23,8 +23,7 @@ class Category extends JsonResource 'display_mode' => $this->display_mode, 'description' => $this->description, 'parent_id' => $this->parent_id, - 'image_url' => $this->image_url, - 'icon_path' => $this->category_icon_path + 'image_url' => $this->category_icon_path ? Storage::url($this->category_icon_path) : $this->image_url, // 'additional' => is_array($this->resource->additional) diff --git a/packages/TPS/Shop/src/Contracts/Balance.php b/packages/TPS/Shop/src/Contracts/Balance.php new file mode 100644 index 000000000..f269ce9d3 --- /dev/null +++ b/packages/TPS/Shop/src/Contracts/Balance.php @@ -0,0 +1,8 @@ +belongsTo(CustomerProxy::modelClass()); + } + + //todo belongs to transaction?? +} \ No newline at end of file diff --git a/packages/TPS/Shop/src/Repositories/CustomerRepository.php b/packages/TPS/Shop/src/Repositories/CustomerRepository.php deleted file mode 100644 index 4fdf862f9..000000000 --- a/packages/TPS/Shop/src/Repositories/CustomerRepository.php +++ /dev/null @@ -1,85 +0,0 @@ -countryRepository = $countryRepository; - - $this->countryStateRepository = $countryStateRepository; - - $this->customerGroupRepository = $customerGroupRepository; - } - - /** - * Dummy Data For Customer Table. - * - * @return mixed - */ - public function customerDummyData($faker) - { - $gender = $faker->randomElement(['male', 'female']); - - $customerGroup = $this->customerGroupRepository->get()->random(); - - return [ - 'first_name' => $faker->firstName($gender), - 'last_name' => $faker->lastName, - 'gender' => $gender, - 'date_of_birth' => $faker->date($format = 'Y-m-d', $max = 'now'), - 'email' => $faker->unique()->safeEmail(), - 'phone' => $faker->e164PhoneNumber, - 'password' => bcrypt('admin123'), - 'customer_group_id' => $customerGroup->id, - 'is_verified' => 1, - 'remember_token' =>str_random(10) - ]; - } -} \ No newline at end of file