@extends('vendors.layout') @section('content') @php $vendorId = Auth::guard('vendor')->user()->id; if ($vendorId) { $current_package = App\Http\Helpers\VendorPermissionHelper::packagePermission($vendorId); if ($current_package != '[]') { $numberoffImages = $current_package->number_of_images_per_listing; } else { $numberoffImages = 0; } if (!empty($current_package) && !empty($current_package->features)) { $permissions = json_decode($current_package->features, true); } else { $permissions = null; } } else { $permissions = null; } @endphp
@if ($current_package != '[]') @if (vendorTotalAddedListing($vendorId) >= $current_package->number_of_listing)
{{ __("You can't add more Listing. Please buy/extend a plan to add Listing") }}
@php $can_listing_add = 2; @endphp @else @php $can_listing_add = 1; @endphp @endif @else @php $pendingMemb = \App\Models\Membership::query() ->where([['vendor_id', '=', Auth::id()], ['status', 0]]) ->whereYear('start_date', '<>', '9999') ->orderBy('id', 'DESC') ->first(); $pendingPackage = isset($pendingMemb) ? \App\Models\Package::query()->findOrFail($pendingMemb->package_id) : null; @endphp @if ($pendingPackage)
{{ __('You have requested a package which needs an action (Approval / Rejection) by Admin. You will be notified via mail once an action is taken.') }}
{{ __('Pending Package') . ':' }} {{ $pendingPackage->title }} {{ $pendingPackage->term }} {{ __('Decision Pending') }}
@else @php $newMemb = \App\Models\Membership::query() ->where([['vendor_id', '=', Auth::id()], ['status', 0]]) ->first(); @endphp @if ($newMemb)
{{ __('Your membership is expired. Please purchase a new package / extend the current package.') }}
@endif
{{ __('Please purchase a new package to add Listing.') }}
@endif @php $can_listing_add = 0; @endphp @endif
{{ __('Add Listing') }}
    @csrf

    @if ($current_package != '[]') @if (vendorTotalAddedListing($vendorId) <= $current_package->number_of_listing)

    {{ __('You can upload maximum ' . $current_package->number_of_images_per_listing . ' images under one listing') }}

    @endif @endif
    @csrf

    ...
    {{ __('Choose Image') }}

    {{ __('Image Size 600x400') }}

    @if (is_array($permissions) && in_array('Video', $permissions))

    @php $display = 'none'; @endphp
    ...
    {{ __('Choose Image') }}
    @endif
    @if (is_array($permissions) && in_array('Video', $permissions))
    @endif
    @php $approve = App\Models\BasicSettings\Basic::select('admin_approve_status')->first(); $status = $approve->admin_approve_status; @endphp

    {{ __('The Latitude must be between -90 and 90. Ex:49.43453') }}

    {{ __('The Longitude must be between -180 and 180. Ex:149.91553') }}

    @foreach ($languages as $language)
    @php $categories = App\Models\ListingCategory::where('language_id', $language->id) ->where('status', 1) ->get(); @endphp
    @php $Countries = App\Models\Location\Country::where('language_id', $language->id)->get(); $totalCountry = $Countries->count(); @endphp @if ($totalCountry > 0)
    @endif @php $States = App\Models\Location\State::where('language_id', $language->id)->get(); $totalState = $States->count(); @endphp @if ($totalState > 0)
    @endif @php $cities = App\Models\Location\City::where('language_id', $language->id)->get(); $totalCity = $cities->count(); @endphp
    @if (is_array($permissions) && in_array('Amenities', $permissions))
    @php $aminities = App\Models\Aminite::where('language_id', $language->id)->get(); @endphp
    @endif
    @php $currLang = $language; @endphp @foreach ($languages as $language) @continue($language->id == $currLang->id)
    @endforeach
    @endforeach
    @endsection @section('script') @endsection