Rubenwouters\CrmLauncher\Controllers\PublishController::insertInnerComment PHP Метод

insertInnerComment() приватный Метод

Insert inner comment in DB
private insertInnerComment ( integer $id, Illuminate\Http\Request $request, integer $messageId, object $reply ) : void
$id integer
$request Illuminate\Http\Request
$messageId integer
$reply object
Результат void
    private function insertInnerComment($id, $request, $messageId, $reply)
    {
        $innerComment = new InnerComment();
        if ($this->reaction->where('fb_post_id', $messageId)->exists()) {
            $innerComment->reaction_id = $this->reaction->where('fb_post_id', $messageId)->first()->id;
        }
        $innerComment->user_id = Auth::user()->id;
        $innerComment->fb_post_id = $reply->id;
        $innerComment->fb_reply_id = $messageId;
        $innerComment->message = $request->input('answer');
        $innerComment->post_date = Carbon::now();
        $innerComment->save();
    }