app/Http/Controllers/AccountController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Account  $account
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $account = Account::find($id);
        $account->customer_id = $request->input('customer_id');
        $account->account_number = $request->input('account_number');
        $account->account_balance = $request->input('account_balance');
        $account->account_type_id = $request->input('account_type_id');
        $account->currency_id = $request->input('currency_id');
        $account->branch_id = $request->input('branch_id');
        $account->save();
        return redirect()->route('accounts.index');
    }
public function update ( Request $ request , $ id ) { $ account = Account :: find ( $ id ) ; $ account -> customer_id = $ request -> input ( 'customer_id' ) ; $ account -> account_number = $ request -> input ( 'account_number' ) ; $ account -> account_balance = $ request -> input ( 'account_balance' ) ; $ account -> account_type_id = $ request -> input ( 'account_type_id' ) ; $ account -> currency_id = $ request -> input ( 'currency_id' ) ; $ account -> branch_id = $ request -> input ( 'branch_id' ) ; $ account -> save ( ) ; return redirect ( ) -> route ( 'accounts.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .