@csrf
{{session()->get('msg')}}
{{ $errors->first('excel_file_upload')}}
{{-- @php ini_set('memory_limit', '40960M'); $numbers = []; $jaipur = App\Models\Jaipur::take(100)->get(); foreach($jaipur as $r){ if(is_null(App\Models\UniqueNumber::where('number',$r->number)->first())){ $numbers[] = $r->number; } } dd($numbers); @endphp @php ini_set('memory_limit', '40960M'); $numbers = []; App\Models\Jaipur::chunk(100, function ($jaipurRecords) use (&$numbers) { foreach ($jaipurRecords as $r) { if (is_null(App\Models\UniqueNumber::where('number', $r->number)->first())) { $numbers[] = $r->number; } } }); dd($numbers); @endphp @php // ini_set('memory_limit', '4096M'); // Adjust memory limit as needed $numbers = []; App\Models\Jaipur::orderBy('id') // Order by primary key or another indexed column ->chunk(100, function ($jaipurRecords) use (&$numbers) { $jaipurNumbers = $jaipurRecords->pluck('number')->toArray(); $uniqueNumbers = App\Models\UniqueNumber::whereIn('number', $jaipurNumbers)->pluck('number')->toArray(); $numbers = array_merge($numbers, array_diff($jaipurNumbers, $uniqueNumbers)); }); dd($numbers); @endphp --}}