public function create($name, $price, $active, $thumb, $content) { Assertion::string($name); Assertion::boolean($active); $product = new Product(['name' => $name, 'slug' => Str::slug($name), 'price' => $price, 'active' => $active, 'content' => $content, 'thumb' => $thumb]); $product->author()->associate($this->context->context()); $this->products->add($product); return $product; }