@extends('admin.layout') @section('content')

{{ translate('Tawk live chat') }}

@php $today_date = \Carbon\Carbon::now(); $expire_date = \Carbon\Carbon::createFromFormat('Y-m-d', date('Y-m-d', strtotime('+30 day', strtotime(\App\Addon::where('type', 'Tawk_purchase_date')->first()->value)))); $data_difference = $today_date->diffInDays($expire_date, false); //false param @endphp
@if (($addon_manager['payment_type'] == 'one_time' && \App\Addon::where('type', 'Tawk_purchase_date')->first()->value != null) || ($addon_manager['payment_type'] == 'per_month' && $data_difference >= 0) || $addon_manager['price'] == 0)
{{ translate('Tawk integration data') }}
{!! Form::open(['method' => 'post', 'action' => 'Admin\Addons\TawkController@updateTawkConf', 'files' => true, 'class' => 'form_to_submit']) !!}
{!! Form::checkbox('Tawk_active', null, $newaddons['Tawk_active'], ['id' => 'Checkbox_1']) !!}
{!! Form::text('Tawk_id', $newaddons['Tawk_id'], ['class' => 'form-control', 'placeholder' => translate('ID')]) !!}
{!! Form::Close() !!}
@else

{{ translate('You dont purchase this item or require to renew this item subscribtion') }}

{{ translate('Add to cart') }}

@endif
@endsection @section('script') @endsection