app/Http/Controllers/CekKendaraanController.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, $platnomer)
    {
        $request->validate([
            'platnomer' => 'required',
            'no_mesin' => 'required',
            'selinder' => 'required',
            'merk' => 'required',
            'type' => 'required',
            'warna' => 'required',
            'bahan_bakar' => 'required',
            'kilometer' => 'required',
            'tahun' => 'required',
        ]);
        cekkendaraan::find($platnomer)->update($request->all());
        return redirect()->route('CekKendaraan.index')
            ->with('success', 'Kendaraan Berhasil Diupdate');
    }
public function update ( Request $ request , $ platnomer ) { $ request -> validate ( [ 'platnomer' => 'required' , 'no_mesin' => 'required' , 'selinder' => 'required' , 'merk' => 'required' , 'type' => 'required' , 'warna' => 'required' , 'bahan_bakar' => 'required' , 'kilometer' => 'required' , 'tahun' => 'required' , ] ) ; cekkendaraan :: find ( $ platnomer ) -> update ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'CekKendaraan.index' ) -> with ( 'success' , 'Kendaraan Berhasil Diupdate' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .