@extends('layouts.app') @section('title', __('superadmin::lang.superadmin') . ' | Business') @section('content')

@lang( 'superadmin::lang.all_business' ) @lang( 'superadmin::lang.manage_business' )

@can('superadmin') @foreach ($businesses as $business) @php $address = $business->locations->first(); @endphp @if($loop->index % 3 == 0)
@endif
@if(!empty($business->logo)) Business Logo @endif

{{ $business->name }}

{{ $business->owner->first_name . ' ' . $business->owner->last_name}}
{{ $business->owner->email}}
{{ $business->owner->contact_no }}
{{ implode([$address->mobile, $address->alternate_number], ", ") }}
@php $address_array = []; $city_landmark = ''; if(!empty($address->city)){ $city_landmark = $address->city; } if(!empty($address->landmark)){ $city_landmark .= ', ' . $address->landmark; } if(!empty($city_landmark)){ $address_array[] = $city_landmark; } $state_country = ''; if(!empty($address->state)){ $state_country = $address->state; } if(!empty($address->country)){ $state_country .= ' (' . $address->country . ')'; } if(!empty($state_country)){ $address_array[] = $state_country; } if(!empty($address->zip_code)){ $address_array[] = __('business.zip_code') . ': ' .$address->zip_code; } @endphp {!! strip_tags(implode('
', $address_array), '
') !!}
@php $package = !empty($business->subscriptions[0]) ? optional($business->subscriptions[0])->package : ''; @endphp @if(!empty($package)) {{$package->name}} @endif
@if(!empty($business->subscriptions[0]))
@lang('superadmin::lang.remaining', ['days' => \Carbon::today()->diffInDays($business->subscriptions[0]->end_date)])
@endif
@if($loop->index % 3 == 2)
@endif @endforeach
{{ $businesses->links() }}
@endcan
@endsection @section('javascript') @endsection