app/Http/Controllers/FAQController.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(StoreFAQRequest $request)
    {
        $fields = $request->validated();
        $pergunta = new Perguntas();
        $pergunta->fill($fields);
        $pergunta->save();
        return redirect()->route('faq.index')->with('success', 'Pergunta adicionada com sucesso', compact('pergunta'));
    }
public function store ( StoreFAQRequest $ request ) { $ fields = $ request -> validated ( ) ; $ pergunta = new Perguntas ( ) ; $ pergunta -> fill ( $ fields ) ; $ pergunta -> save ( ) ; return redirect ( ) -> route ( 'faq.index' ) -> with ( 'success' , 'Pergunta adicionada com sucesso' , compact ( 'pergunta' ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .