app/Http/Controllers/TransferController.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)
    {
        $this->validate($request, [
            'dari' => 'required',
            'untuk' => 'required',
            'amount' => 'required'
        ]);
        $transfer = Transfer::findOrFail($id)->update($request->all());
        return redirect()->route('transfer.index')->with('message', 'Transfer berhasil diubah!');
    }
public function update ( Request $ request , $ id ) { $ this -> validate ( $ request , [ 'dari' => 'required' , 'untuk' => 'required' , 'amount' => 'required' ] ) ; $ transfer = Transfer :: findOrFail ( $ id ) -> update ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'transfer.index' ) -> with ( 'message' , 'Transfer berhasil diubah!' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
//