app/Http/Controllers/EmployeeController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Employee  $employee
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Employee $employee)
    {
        $id = $request->input('h_id');
        $first_name = $request->input('first_name');
        $last_name = $request->input('last_name');
        $address = $request->input('address');
        $city = $request->input('city');
        $gender = $request->input('gender');
        $id_passport_number = $request->input('id_passport_number');
        $phone_number = $request->input('phone_number');
        $email_adderss = $request->input('email_adderss');
        $start_date = $request->input('start_date');
        $user_id = $request->input('user_id');
        DB::update('UPDATE employees SET first_name = ?, last_name = ?,
         address = ?, city = ?, gender = ?, id_passport_number = ?, phone_number = ?,
         email_adderss = ?, start_date = ?, user_id = ? WHERE `employees`.`id` = ?', 
         [$first_name, $last_name, $address, $city, $gender, $id_passport_number,
          $phone_number, $email_adderss, $start_date, $user_id, $id]);
        return view('admin.employee.employee_manage', ['employees' => Employee::all()]);
    }
public function update ( Request $ request , Employee $ employee ) { $ id = $ request -> input ( 'h_id' ) ; $ first_name = $ request -> input ( 'first_name' ) ; $ last_name = $ request -> input ( 'last_name' ) ; $ address = $ request -> input ( 'address' ) ; $ city = $ request -> input ( 'city' ) ; $ gender = $ request -> input ( 'gender' ) ; $ id_passport_number = $ request -> input ( 'id_passport_number' ) ; $ phone_number = $ request -> input ( 'phone_number' ) ; $ email_adderss = $ request -> input ( 'email_adderss' ) ; $ start_date = $ request -> input ( 'start_date' ) ; $ user_id = $ request -> input ( 'user_id' ) ; DB :: update ( 'UPDATE employees SET first_name = ?, last_name = ?,
         address = ?, city = ?, gender = ?, id_passport_number = ?, phone_number = ?,
         email_adderss = ?, start_date = ?, user_id = ? WHERE `employees`.`id` = ?' , [ $ first_name , $ last_name , $ address , $ city , $ gender , $ id_passport_number , $ phone_number , $ email_adderss , $ start_date , $ user_id , $ id ] ) ; return view ( 'admin.employee.employee_manage' , [ 'employees' => Employee :: all ( ) ] ) ; }
Update the specified resource in storage.
Update the specified resource in storage .