app/Http/Controllers/NhaCungCapController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $nhacc= nhaCungCap::findOrFail($id);
        $nhacc->tennhacungcap = $request->tennhacungcap;
        $nhacc->diachi = $request->diachi;
        $nhacc->email = $request->email;
        $nhacc->sodienthoai = $request->sodienthoai;
        $nhacc->save();
        return back()
            ->with('success','Sửa thành công');
    }
public function update ( Request $ request , $ id ) { $ nhacc = nhaCungCap :: findOrFail ( $ id ) ; $ nhacc -> tennhacungcap = $ request -> tennhacungcap ; $ nhacc -> diachi = $ request -> diachi ; $ nhacc -> email = $ request -> email ; $ nhacc -> sodienthoai = $ request -> sodienthoai ; $ nhacc -> save ( ) ; return back ( ) -> with ( 'success' , 'Sửa thành công'); }
Update the specified resource in storage.
Update the specified resource in storage .
//