$this->faker->name, 'mobile' => $this->faker->phoneNumber, 'idcard' => $this->faker->numerify('11010119########'), 'credent' => $this->faker->randomElement([ Blacklist::CREDENT_ID_CARD, Blacklist::CREDENT_PASSPORT, ]), 'status' => $this->faker->randomElement([ Blacklist::STATUS_DISABLED, Blacklist::STATUS_ENABLED, ]), 'start_date' => $this->faker->optional()->date(), 'end_date' => $this->faker->optional()->date(), 'reason' => $this->faker->sentence, 'company_name' => $this->faker->company, 'file' => $this->faker->randomElements([1, 2, 3, 4, 5], $this->faker->numberBetween(0, 3)), ]; } public function enabled() { return $this->state(function (array $attributes) { return [ 'status' => Blacklist::STATUS_ENABLED, ]; }); } public function disabled() { return $this->state(function (array $attributes) { return [ 'status' => Blacklist::STATUS_DISABLED, ]; }); } public function idCard() { return $this->state(function (array $attributes) { return [ 'credent' => Blacklist::CREDENT_ID_CARD, ]; }); } public function passport() { return $this->state(function (array $attributes) { return [ 'credent' => Blacklist::CREDENT_PASSPORT, ]; }); } }