app/Http/Controllers/CourierController.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)
    {
        Courier::where('id',$id)->update([
            'courier'=>$request->courier,
            'updated_at'=>Carbon::now()->format('Y-m-d H:i:s')
        ]);
        return redirect('/courier')->with('berhasil','Data kurir berhasil diubah!');
    }
public function update ( Request $ request , $ id ) { Courier :: where ( 'id' , $ id ) -> update ( [ 'courier' => $ request -> courier , 'updated_at' => Carbon :: now ( ) -> format ( 'Y-m-d H:i:s' ) ] ) ; return redirect ( '/courier' ) -> with ( 'berhasil' , 'Data kurir berhasil diubah!' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
//memperbarui data