Beispiel #1
0
 /**
  * Adds a post to this blog
  *
  * @param Post $post
  * @return void
  */
 public function addPost(Post $post)
 {
     $this->posts->attach($post);
 }
Beispiel #2
0
 /**
  * Adds a related post
  *
  * @param Post $post
  * @return void
  */
 public function addRelatedPost(Post $post)
 {
     $this->relatedPosts->attach($post);
 }