How to take all the words in one normal array from the database in the Laravel framework with a minimum waste of time?
I want to take all the words from the database into default array . I have more than 50,000 words in the database, and most likely this number is up to a million. Therefore, I want this operation did not take much time. I tried such ways in which not a word is put into the usual array. That is, the words are passed to the associative array: $words = DB::table('words')->pluck('word'); dump($words); Result: Collection {#197 ▼ #items: array:12 [▼ 0 => "тоҷик" 1 => "ӯзбек" 2 => "қирғиз" 3 => "эрон" 4 => "япон" 5 => "англис" 6 => "тоҷик" 7 => "ӯзбек" 8 => "қирғиз" 9 => "эрон" 10 => "япон" 11 =>