mapped[$this->index][$this->value])) { $category = Auth::user()->categories()->find($this->mapped[$this->index][$this->value]); } else { $category = Category::firstOrCreateEncrypted( [ 'name' => $this->value, 'user_id' => Auth::user()->id ] ); } return $category; } }