getCustomerTypes(), $this->getVendorTypes()); return [ 'company_id' => $this->company->id, 'type' => $this->faker->randomElement($types), 'name' => $this->faker->name, 'email' => $this->faker->unique()->safeEmail, 'user_id' => null, 'tax_number' => $this->faker->randomNumber(9), 'phone' => $this->faker->phoneNumber, 'address' => $this->faker->address, 'website' => 'https://akaunting.com', 'currency_code' => setting('default.currency'), 'reference' => $this->faker->text(5), 'enabled' => $this->faker->boolean ? 1 : 0, ]; } /** * Indicate that the model is enabled. * * @return \Illuminate\Database\Eloquent\Factories\Factory */ public function enabled() { return $this->state([ 'enabled' => 1, ]); } /** * Indicate that the model is disabled. * * @return \Illuminate\Database\Eloquent\Factories\Factory */ public function disabled() { return $this->state([ 'enabled' => 0, ]); } /** * Indicate that the model type is customer. * * @return \Illuminate\Database\Eloquent\Factories\Factory */ public function customer() { return $this->state([ 'type' => 'customer', ]); } /** * Indicate that the model type is vendor. * * @return \Illuminate\Database\Eloquent\Factories\Factory */ public function vendor() { return $this->state([ 'type' => 'vendor', ]); } }