$this->company->id, 'name' => $this->faker->text(15), 'description' => $this->faker->text(100), 'purchase_price' => $this->faker->randomFloat(2, 10, 20), 'sale_price' => $this->faker->randomFloat(2, 10, 20), 'category_id' => $this->company->categories()->item()->get()->random(1)->pluck('id')->first(), 'tax_id' => null, '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, ]); } }