@extends('layouts.app') @section('body_content')

Lead Info

@csrf @php $file = fopen($filename, "r"); $i = 1; while(($getData = fgetcsv($file, 20000, ",")) !== FALSE) { $created_time = $getData[0]; $lead_query = $getData[1]; $phone =$getData[2]; $name = $getData[3]; $email = $getData[4]; $url_link = $getData[5]; $lead_form = $getData[6]; $lead_source_check = DB::table('lead_sources')->where('name', $lead_form)->first(); $lead_source = DB::table('lead_sources')->get(); $updated_phone = str_replace(['p:+8800', 'p:+880', '+8800', '+880', 'p:00', 'p:0'], '0', $phone); $check_previous = DB::table('lead_infos')->where(['phone'=>$updated_phone])->first(['id']); @endphp @php $i++; $ss= substr(str_shuffle($getData[0]),0, 4).rand(0,3); } fclose($file); @endphp
@if(!empty(optional($check_previous)->id))

This content is Exist!

@else

Ok

@endif
@if(!empty(optional($lead_source_check)->id))

{{$lead_source_check->name}}

@else @endif
@endsection