public function create($text, $profile_id = Null) { $slug = $this->helper->slugify($text, $this->tag); $this->tag = $this->tag->firstOrCreate(["text" => $text, "slug" => $slug, "profile_id" => $profile_id]); return $this->tag; }
public function create($text) { $slug = $this->helper->slugify($text, $this->tag); $this->tag = $this->tag->firstOrCreate(compact("text", "slug")); return $this->tag; }