app/Http/Controllers/EmployeeController.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)
    {
        $data = $request->all();
        if (Employee::create($data)) {
            return redirect('employee_new')->withMessage('New employee added');
        }
        return redirect('employee_new')->withMessage('Error while creating');
    }
public function store ( Request $ request ) { $ data = $ request -> all ( ) ; if ( Employee :: create ( $ data ) ) { return redirect ( 'employee_new' ) -> withMessage ( 'New employee added' ) ; } return redirect ( 'employee_new' ) -> withMessage ( 'Error while creating' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .