diff --git a/packages/Webkul/BookingProduct/src/Models/Booking.php b/packages/Webkul/BookingProduct/src/Models/Booking.php index 182974986..eb140e7db 100644 --- a/packages/Webkul/BookingProduct/src/Models/Booking.php +++ b/packages/Webkul/BookingProduct/src/Models/Booking.php @@ -13,8 +13,8 @@ class Booking extends Model implements BookingContract protected $fillable = [ 'qty', - 'from', - 'to', + 'available_from', + 'available_to', 'order_item_id', 'booking_product_event_ticket_id', 'product_id', diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php index 0c3df70bb..3c89c6852 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php @@ -154,6 +154,17 @@ available_to: '' } } + }, + + created: function() { + if (this.booking.available_from) { + this.booking.available_from = "{{ $bookingProduct->available_from->format('Y-m-d H:i:s') }}"; + } + + + if (this.booking.available_to) { + this.booking.available_to = "{{ $bookingProduct->available_to->format('Y-m-d H:i:s') }}"; + } } }); diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/home/slider.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/home/slider.blade.php index cee9a1cb6..6d21e9035 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/home/slider.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/home/slider.blade.php @@ -2,7 +2,7 @@ $direction = core()->getCurrentLocale()->direction; @endphp -@if ($velocityMetaData->slider) +@if ($velocityMetaData && $velocityMetaData->slider) @endif