@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')
@if ($count == 1) {{ __('Plugin') }} @else {{ __('Plugins') }} @endif
{{ __('Back') }} @if ($vendor_id != 0) @endif @php $dContent = App\Models\Listing\ListingContent::where('listing_id', $id) ->where('language_id', $defaultLang->id) ->first(); $slug = !empty($dContent) ? $dContent->slug : ''; @endphp @if ($dContent) {{ __('Preview') }} @endif
@if (is_array($permissions) && in_array('Tawk.To', $permissions))
@csrf
{{ __('Tawk.To') }}
@if ($errors->has('tawkto_status'))

{{ $errors->first('tawkto_status') }}

@endif
@if ($errors->has('tawkto_direct_chat_link'))

{{ $errors->first('tawkto_direct_chat_link') }}

@endif
@endif @if (is_array($permissions) && in_array('Telegram', $permissions))
@csrf
{{ __('Telegram') }}
@if ($errors->has('telegram_status'))

{{ $errors->first('telegram_status') }}

@endif
@if ($errors->has('telegram_username'))

{{ $errors->first('telegram_username') }}

@endif
@endif @if (is_array($permissions) && in_array('Messenger', $permissions))
@csrf
{{ __('Messenger') }}
@if ($errors->has('messenger_status'))

{{ $errors->first('messenger_status') }}

@endif
@if ($errors->has('messenger_direct_chat_link'))

{{ $errors->first('messenger_direct_chat_link') }}

@endif
@endif @if (is_array($permissions) && in_array('WhatsApp', $permissions))
@csrf
{{ __('WhatsApp') }}

@if ($errors->has('whatsapp_status'))

{{ $errors->first('whatsapp_status') }}

@endif
@if ($errors->has('whatsapp_number'))

{{ $errors->first('whatsapp_number') }}

@endif
@if ($errors->has('whatsapp_header_title'))

{{ $errors->first('whatsapp_header_title') }}

@endif
@if ($errors->has('whatsapp_popup_status'))

{{ $errors->first('whatsapp_popup_status') }}

@endif
@if ($errors->has('whatsapp_popup_message'))

{{ $errors->first('whatsapp_popup_message') }}

@endif
@endif
@includeIf('admin.listing.check-limit') @endsection