Example #1
0
 /**
  * Check to see if the specification is satisfied
  *
  * @param TagName $tag
  * @return bool
  */
 public function isSatisfiedBy(TagName $tag)
 {
     if (!$this->tagRepo->tagOfName($tag)) {
         return true;
     }
     return false;
 }
 public function store(PostRequest $request, TagRepository $tagRepository)
 {
     $inputs = array_merge($request->all(), ['user_id' => $request->user()->id]);
     $post = $this->postRepository->store($inputs);
     if (isset($inputs['tags'])) {
         $tagRepository->store($post, $inputs['tags']);
     }
     return redirect(route('post.index'));
 }
 /**
  * Specific word used target information
  *
  * return sample
  *   ['freeboard' => ['xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx']]
  *
  * @param string $word       specific word
  * @param string $instanceId instance id
  * @return array
  */
 public function getUsed($word, $instanceId = null)
 {
     return $this->repo->getUsed($word, $instanceId);
 }