app/Http/Controllers/FAQController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(UpdateFAQRequest $request, Perguntas $pergunta)
    {
        $fields = $request->validated();
        $pergunta->update($fields);
        $pergunta->save();
        return redirect()->route('faq.index')
            ->with('success', 'Pergunta foi editada com sucesso', compact('pergunta'));
    }
public function update ( UpdateFAQRequest $ request , Perguntas $ pergunta ) { $ fields = $ request -> validated ( ) ; $ pergunta -> update ( $ fields ) ; $ pergunta -> save ( ) ; return redirect ( ) -> route ( 'faq.index' ) -> with ( 'success' , 'Pergunta foi editada com sucesso' , compact ( 'pergunta' ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .