app/Http/Controllers/DataBaseController.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(Request $request)
    {
        $request->validate([
            'descricao' => 'required',
            'host' => 'required',
            'port' => 'required',
            'base' => 'required',
        ]);
        DataBase::create($request->all());
        return redirect()->route('data-base.index')
                        ->with('success','Post created successfully.');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'descricao' => 'required' , 'host' => 'required' , 'port' => 'required' , 'base' => 'required' , ] ) ; DataBase :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'data-base.index' ) -> with ( 'success' , 'Post created successfully.' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .