app/Http/Controllers/SupplierController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Supplier  $supplier
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Supplier $supplier)
    {
        $supplier->name = $request->nama;
        $supplier->address = $request->alamat;
        $supplier->save();
        return redirect()->route("supplier.index")->with("status", "Supplier is changed!");
    }
public function update ( Request $ request , Supplier $ supplier ) { $ supplier -> name = $ request -> nama ; $ supplier -> address = $ request -> alamat ; $ supplier -> save ( ) ; return redirect ( ) -> route ( " supplier.index " ) -> with ( " status " , " Supplier is changed! " ) ; }
Update the specified resource in storage.
Update the specified resource in storage .