app/Http/Controllers/QuestionController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Question  $question
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(AskQuestionRequest $request, Question $question)
    {
        $this->authorize('update', $question);
       $question->update($request->only('title','body'));
       return redirect('/questions')
       ->with('update',' Your Question Updated');
    }
public function update ( AskQuestionRequest $ request , Question $ question ) { $ this -> authorize ( 'update' , $ question ) ; $ question -> update ( $ request -> only ( 'title' , 'body' ) ) ; return redirect ( '/questions' ) -> with ( 'update' , ' Your Question Updated' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .