define(Section::class, function (Faker $faker) { // dd(Semester::all()->pluck('code')->toArray()); return [ 'semester_code' => $faker->randomElement(Semester::all()->pluck('code')->toArray()), 'course_id' => $faker->numberBetween(1, Course::count()), 'code' => $faker->lexify('???'), 'student_count' => $faker->optional()->randomNumber(3), 'syllabus' => $faker->optional()->text(), 'credits' => $faker->optional()->randomFloat(2,0,4), ]; });