I am creating a Laravel table for the languages.
In my up
function of my Migration class for languages I want to insert all the different languages (ISO).
I have one single row that is giving some headache; Arabic. I let you try to insert this string 'native_name' =>'العربية' into this PHP code in your favorite editor (I have tried in Visual Code, in Google Sheet and even here in StackOverflow)
\DB::table('languages')->insert('language_name' => 'Arabic',
HOW TO INSERT native language here?? ,'639_1'=> 'ar', '639_1' => 'ar', '639_2_T' => 'ara', '639_2_B' => 'ara', '639_3' => 'ara + 30', '639_6' => '');
The field '639_1' is moved and 'العربية' is placed as a field... like this:
\DB::table('languages')->insert(['language_name' => 'Arabic',
'native_name' =>'العربية','639_1'=> 'ar', '639_1' => 'ar', '639_2_T' => 'ara', '639_2_B' => 'ara', '639_3' => 'ara + 30', '639_6' => '']);
Things like that:
\DB::table('languages')->insert(['language_name' => 'English', 'native_name' => 'English', '639_1' => 'en', '639_2_T' => 'eng', '639_2_B' => 'eng', '639_3' => 'eng', '639_6' => 'engs']);
works like a charm.