app/Http/Controllers/CategoriaFAQController.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(StoreCategoriaFAQRequest $request)
    {
        $fields = $request->validated();
        $categorias = new CategoriaPergunta();
        $categorias->fill($fields);
        $categorias->save();
        return redirect()->route('categoriasFAQ.index')->with('success', 'Categoria adicionada com sucesso');
    }
public function store ( StoreCategoriaFAQRequest $ request ) { $ fields = $ request -> validated ( ) ; $ categorias = new CategoriaPergunta ( ) ; $ categorias -> fill ( $ fields ) ; $ categorias -> save ( ) ; return redirect ( ) -> route ( 'categoriasFAQ.index' ) -> with ( 'success' , 'Categoria adicionada com sucesso' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .