public function firstOrCreateByName($name) { return $this->tag->firstOrCreate(array('name' => $name))->toArray(); }