Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | public function create(): BlogComment |
||
41 | { |
||
42 | return DB::transaction(function () { |
||
43 | $comment = BlogComment::create($this->only([ |
||
44 | 'blog_article_id', |
||
45 | 'content' |
||
46 | ])); |
||
47 | |||
48 | $parser = new MentionParser($comment); |
||
|
|||
49 | $content = $parser->parse($this->content); |
||
50 | $comment->content = $content; |
||
51 | $comment->save(); |
||
52 | |||
53 | return $comment; |
||
54 | }); |
||
57 |