@extends('admin.layout') @php $vendor_id = App\Models\Listing\Listing::where('id', $id)->pluck('vendor_id')->first(); if ($vendor_id != 0) { $current_package = App\Http\Helpers\VendorPermissionHelper::packagePermission($vendor_id); $dowgraded = App\Http\Helpers\VendorPermissionHelper::packagesDowngraded($vendor_id); $listingCanAdd = packageTotalListing($vendor_id) - vendorTotalListing($vendor_id); if (!empty($current_package) && !empty($current_package->features)) { $permissions = json_decode($current_package->features, true); } } else { $permissions = [ 'Listing Enquiry Form', 'Video', 'Amenities', 'Feature', 'Social Links', 'FAQ', 'Business Hours', 'Products', 'Product Enquiry Form', 'Messenger', 'WhatsApp', 'Telegram', 'Tawk.To', ]; } $requiredPermissions = ['Messenger', 'WhatsApp', 'Telegram', 'Tawk.To']; $intersection = array_intersect($permissions, $requiredPermissions); $count = count($intersection); @endphp @section('content')