From 289e6a07761e8cefbf7c43d524c184654db2a6f0 Mon Sep 17 00:00:00 2001 From: Amanmyrat Date: Wed, 26 Jul 2023 18:31:34 +0500 Subject: [PATCH] Make shop and sale image multiple --- plugins/tps/shops/models/Sale.php | 4 ++-- plugins/tps/shops/models/Shop.php | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/tps/shops/models/Sale.php b/plugins/tps/shops/models/Sale.php index 537299d..012fa9f 100755 --- a/plugins/tps/shops/models/Sale.php +++ b/plugins/tps/shops/models/Sale.php @@ -27,8 +27,8 @@ class Sale extends Model public $rules = [ ]; - public $attachOne = [ - 'image' => 'Tps\Shops\Classes\Attachment', + public $attachMany = [ + 'images' => 'Tps\Shops\Classes\Attachment', ]; public $belongsTo = [ diff --git a/plugins/tps/shops/models/Shop.php b/plugins/tps/shops/models/Shop.php index 42b0e5f..8608b97 100755 --- a/plugins/tps/shops/models/Shop.php +++ b/plugins/tps/shops/models/Shop.php @@ -24,8 +24,12 @@ class Shop extends Model public $fillable = ["name", "floor", "phone", "instagram_name", "instagram_link"]; public $attachOne = [ + 'badge' => 'System\Models\File' + ]; + + public $attachMany = [ 'badge' => 'System\Models\File', - 'image' => 'System\Models\File', + 'images' => 'System\Models\File', ]; public $belongsTo = [