From 089a70ff9f3190be2f02a60ee4b5632977cb1ca7 Mon Sep 17 00:00:00 2001 From: Devansh Date: Fri, 12 Nov 2021 13:41:08 +0530 Subject: [PATCH] Some Commenting And Mass Assignables Updated --- .../Webkul/Customer/src/Models/Wishlist.php | 33 +++++++++++++------ .../Customer/src/Models/WishlistProxy.php | 3 +- .../account/wishlist/wishlist.blade.php | 1 - 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/packages/Webkul/Customer/src/Models/Wishlist.php b/packages/Webkul/Customer/src/Models/Wishlist.php index 09efa4e80..1a2176eff 100755 --- a/packages/Webkul/Customer/src/Models/Wishlist.php +++ b/packages/Webkul/Customer/src/Models/Wishlist.php @@ -3,29 +3,42 @@ namespace Webkul\Customer\Models; use Illuminate\Database\Eloquent\Model; -use Webkul\Product\Models\ProductProxy; use Webkul\Customer\Contracts\Wishlist as WishlistContract; +use Webkul\Product\Models\ProductProxy; class Wishlist extends Model implements WishlistContract { + /** + * The table associated with the model. + * + * @var string + */ protected $table = 'wishlist'; + /** + * The attributes that should be cast. + * + * @var array + */ protected $casts = [ 'additional' => 'array', ]; - protected $fillable = [ - 'channel_id', - 'product_id', - 'customer_id', - 'additional', - 'moved_to_cart', - 'shared', - 'time_of_moving' + /** + * The attributes that aren't mass assignable. + * + * @var array + */ + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', ]; /** - * The Product that belong to the wishlist. + * The product that belong to the wishlist. + * + * @return \Illuminate\Database\Eloquent\Relations\HasOne */ public function product() { diff --git a/packages/Webkul/Customer/src/Models/WishlistProxy.php b/packages/Webkul/Customer/src/Models/WishlistProxy.php index fea4acb1c..a077b62a9 100644 --- a/packages/Webkul/Customer/src/Models/WishlistProxy.php +++ b/packages/Webkul/Customer/src/Models/WishlistProxy.php @@ -6,5 +6,4 @@ use Konekt\Concord\Proxies\ModelProxy; class WishlistProxy extends ModelProxy { - -} \ No newline at end of file +} diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/wishlist/wishlist.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/wishlist/wishlist.blade.php index 5c00a8e2f..5ae3083d5 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/wishlist/wishlist.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/wishlist/wishlist.blade.php @@ -31,7 +31,6 @@ {!! view_render_event('bagisto.shop.customers.account.wishlist.list.before', ['wishlist' => $items]) !!}
- @if ($items->count()) @foreach ($items as $item) @php