/** @test */ public function it_can_get_and_set_the_tagged_model() { $tag = new IlluminateTag(); $this->assertEquals('Cartalyst\\Tags\\IlluminateTagged', $tag->getTaggedModel()); $tag->setTaggedModel('App\\Models\\TaggedModel'); $this->assertEquals('App\\Models\\TaggedModel', $tag->getTaggedModel()); }
/** * Remove a tag from this ProjectTask */ public function apiRemoveTag(ProjectTask $task, $tagName) { $tagToBeRemoved = \Cartalyst\Tags\IlluminateTag::whereName($tagName)->first(); $task->untag($tagName); return $tagToBeRemoved; }
/** * Remove a tag from a note */ public function apiRemoveTag(ClientNote $client_note, $tagName) { $tagToBeRemoved = \Cartalyst\Tags\IlluminateTag::whereName($tagName)->first(); $client_note->untag($tagName); return $tagToBeRemoved; }
/** * Delete a Tag */ public function apiDeleteTag(IlluminateTag $tag) { $tagToDelete = $tag; $tag->delete(); return $tagToDelete; }
/** * Remove a tag from a note */ public function apiDetachTag(Post $post, $tagName) { $tagToBeRemoved = \Cartalyst\Tags\IlluminateTag::whereName($tagName)->first(); $post->untag($tagName); return $tagToBeRemoved; }