Edit File: InterestTableSeeder.php
<?php namespace Database\Seeders; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; class InterestTableSeeder extends Seeder { public function run() { DB::table('interests')->insert([ [ 'name' => json_encode(['ar' => 'انشطه خارجيه', 'en' => 'Outdoor Activities'], JSON_UNESCAPED_UNICODE), ], [ 'name' => json_encode(['ar' => 'الهوايات', 'en' => 'Hobbies'], JSON_UNESCAPED_UNICODE), ], [ 'name' => json_encode(['ar' => 'اللغات', 'en' => 'Languages'], JSON_UNESCAPED_UNICODE), ], [ 'name' => json_encode(['ar' => 'العمل', 'en' => 'Work'], JSON_UNESCAPED_UNICODE), ] ]); $hobbies = DB::table('interests')->get(); $interestOptions = [ [ 'Interest_id' => $hobbies[0]->id, 'name' => json_encode(['ar' => 'التخييم', 'en' => 'Camping'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[0]->id, 'name' => json_encode(['ar' => 'ركوب الدراجات', 'en' => 'Cycling'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[0]->id, 'name' => json_encode(['ar' => 'الترفيه', 'en' => 'Entertainment'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[0]->id, 'name' => json_encode(['ar' => 'صيد السمك', 'en' => 'Fishing'], JSON_UNESCAPED_UNICODE), ], //--------------------------------------------------------------------------------------------------------------------------------- [ 'Interest_id' => $hobbies[1]->id, 'name' => json_encode(['ar' => 'التصوير', 'en' => 'Photography'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[1]->id, 'name' => json_encode(['ar' => 'القراءة', 'en' => 'Reading'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[1]->id, 'name' => json_encode(['ar' => 'الكتابه', 'en' => 'Writing'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[1]->id, 'name' => json_encode(['ar' => 'اليوجا', 'en' => 'Yoga'], JSON_UNESCAPED_UNICODE), ], //--------------------------------------------------------------------------------------------------------------------------------- [ 'Interest_id' => $hobbies[2]->id, 'name' => json_encode(['ar' => 'العربية', 'en' => 'Arabic'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[2]->id, 'name' => json_encode(['ar' => 'الانجليزية', 'en' => 'English'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[2]->id, 'name' => json_encode(['ar' => 'الفرنسية', 'en' => 'French'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[2]->id, 'name' => json_encode(['ar' => 'الاسبانية', 'en' => 'Spanish'], JSON_UNESCAPED_UNICODE), ], //--------------------------------------------------------------------------------------------------------------------------------- [ 'Interest_id' => $hobbies[3]->id, 'name' => json_encode(['ar' => 'البرمجة', 'en' => 'Programming'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[3]->id, 'name' => json_encode(['ar' => 'التصميم', 'en' => 'Design'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[3]->id, 'name' => json_encode(['ar' => 'المحاسبه', 'en' => 'Accounting'], JSON_UNESCAPED_UNICODE), ], [ 'Interest_id' => $hobbies[3]->id, 'name' => json_encode(['ar' => 'التدريس', 'en' => 'Teaching'], JSON_UNESCAPED_UNICODE), ], //--------------------------------------------------------------------------------------------------------------------------------- ]; DB::table('interest_options')->insert($interestOptions); } }
Back to File Manager