app/Http/Controllers/EmployeeInfoController.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([
            'birthday' => 'required',
            'address' => 'required',
            'employee_id' => 'required|unique:employee_infos',
        ]);
        $data = $request->except(['_token']);
        EmployeeInfo::create($data);
        session()->flash('message','Employee Info Create Successfully!!');
        return redirect()->route('employeeInfo.index');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'birthday' => 'required' , 'address' => 'required' , 'employee_id' => 'required|unique:employee_infos' , ] ) ; $ data = $ request -> except ( [ '_token' ] ) ; EmployeeInfo :: create ( $ data ) ; session ( ) -> flash ( 'message' , 'Employee Info Create Successfully!!' ) ; return redirect ( ) -> route ( 'employeeInfo.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// dd($data);