*/ class StabileFactory extends Factory { protected $model = Stabile::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'amministratore_id' => function () { return Amministratore::factory()->create()->id; }, 'codice_stabile' => strtoupper(bin2hex(random_bytes(4))), 'denominazione' => $this->faker->company(), 'indirizzo' => $this->faker->streetAddress(), 'cap' => '00100', 'citta' => $this->faker->city(), 'provincia' => 'RM', ]; } }