コード例 #1
0
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     $comment = Comment::find($this->id);
     $comment->post_id = $this->post_id;
     $comment->parent_id = $this->parent_id;
     $comment->author = $this->author;
     $comment->email = $this->email;
     $comment->content = $this->content;
     $comment->save();
 }
コード例 #2
0
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     Comment::create(['post_id' => $this->post_id, 'parent_id' => $this->parent_id, 'author' => $this->author, 'email' => $this->email, 'content' => $this->content]);
 }
コード例 #3
0
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     Comment::find($this->id)->delete();
 }