app/Http/Controllers/ReplyController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(CreateReplyRequest $request,Discussion $discussion)
    {
      Reply::create([
        'content'=>$request->content,
        'user_id'=>auth()->user()->id,
        'discussion_id'=>$discussion->id
      ]);
      return redirect(route('discussions.show',[$discussion->fbook->id,$discussion->id]));
    }
public function store ( CreateReplyRequest $ request , Discussion $ discussion ) { Reply :: create ( [ 'content' => $ request -> content , 'user_id' => auth ( ) -> user ( ) -> id , 'discussion_id' => $ discussion -> id ] ) ; return redirect ( route ( 'discussions.show' , [ $ discussion -> fbook -> id , $ discussion -> id ] ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .