I have a problem with Eloquent, my query is:
$b = Dictionary::find($a,$LangtoTranslate);
The problem is count($a) is 67, count($b) is 64..can I get null if value is not founded? In my case, the missing row in $a are "" but I need to have null or "" if not I lost syncronism.
The $a is a simple array:
array:67 [▼
0 => ""
1 => "Frase fatale non identificato"
2 => "Indice fuori dei limiti"
3 => "Errata configurazione del componente"
4 => "Raggiunto il numero massimo di annidamenti"
5 => "Id sequenza non identificata"
6 => "Rassegnazione"
7 => "Salto ad uno step coesistente"
8 => "RETURN senza passare dal via"
9 => "Da Implementare"
The DB is made just from language columns:
| it- IT | en-GB | de-DE | Other Languages |
|---|---|---|---|
| Italiano | English | Deutsch |
i've tried olso:
$b = Dictionary::where($reflang,$a)->first($LangtoTranslate);
But I get null
For reference:
$reflang = 'it-IT';
$LangtoTranslate = [ array of languages ]; => ex: ['en-GB','de-DE']