laravel factory with foreign key and price 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);