示例#1
0
 /**
  * @param Post $post
  */
 public function creating(Post $post)
 {
     if (!$post->user_id) {
         $post->user()->associate($this->auth->user());
     }
 }