@extends('vendors.layout') @php $vendorId = Auth::guard('vendor')->user()->id; if ($vendorId) { $current_package = App\Http\Helpers\VendorPermissionHelper::packagePermission($vendorId); $listingCanAdd = packageTotalListing($vendorId) - vendorTotalListing($vendorId); if (!empty($current_package) && !empty($current_package->features)) { $permissions = json_decode($current_package->features, true); } } $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') }} @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
@endsection