app/Http/Controllers/admin/CandidateController.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([
            'name' => ['required'],
            'surname' => ['required'],
            'mail' => ['required'],
            'password' => ['required'],
            'birth_date' => ['required']
        ]);
        Candidate::create($request->all());
        return redirect()->route('/');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'name' => [ 'required' ] , 'surname' => [ 'required' ] , 'mail' => [ 'required' ] , 'password' => [ 'required' ] , 'birth_date' => [ 'required' ] ] ) ; Candidate :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( '/' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .