jeudi 13 septembre 2018

Whan to Show some data On my view but there is a Error In Laravel

Here I am trying to add, Add Comment feature and it's causing a problem to show data.

public function store(Request $request)
{
    $chatterreply =  new Chatterreply;
    $chatterreply->reply = $request->body;
    $chatterreply->chatter_post_id = $request->chatter_post_id;
    $chatterreply->chatter_discussion_id = $request->chatter_discussion_id;
    $chatterreply->save();
    $chatterreplies = Chatterreply::where('chatter_post_id',$request->chatter_post_id)->get();
     $chatter_editor = config('chatter.editor');

    if ($chatter_editor == 'simplemde') {
        // Dynamically register markdown service provider
        \App::register('GrahamCampbell\Markdown\MarkdownServiceProvider');
    }
    echo "<pre>"; print_r($chatterreplies); die;
    return view('chatter::discussion', compact('chatterreplies','chatter_editor'))->with('chatter_alert','Add Comment Successfully');

}

And Here Is Where I am passing the variable

 $chatter = session()->pull('chatter');
            return view('chatter::discussion', compact('discussion', 'posts', 'chatter_editor'))->with('chatterreplies',$chatter);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire