@php use Carbon\Carbon; $olrsMigrationCount = DB::table('OLRS_MIGRATION')->where('mig_date', Carbon::parse($filDate)->format('Y-m-d'))->whereIn('mig_type', [1,2,3,7,8,9,10,11,12])->count(); $userBranch = \Auth::user()->branchId; $companyConfig = DB::table('gnr_company')->where('id',auth()->user()->company_id_fk)->first(); $olrs = 0; if (!empty($companyConfig) && isset($companyConfig->company_config)) { $companyConfig = json_decode($companyConfig->company_config); isset($companyConfig->olrs) ? $olrs = $companyConfig->olrs : $olrs = 0; } @endphp @if($olrsMigrationCount < 9 && Carbon::parse($filDate)->gte(Carbon::parse('2022-02-28')) && $userBranch != 1 && $olrs = 1)


DRAFT COPY

@endif