laravel 8 factory reference foreign key code example
Example: laravel factory get foreign key
'region_id' => Region::pluck('id')->random()
######### OR #########
$regions = Region::pluck('id');
'region_id' => $this->faker->randomElement($regions);