app/Http/Controllers/Api/AccountController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $subjects = Account::create([
            'customer_id' => $request->input('customer_id'),
            'account_number' => $request->input('account_number'),
            'account_balance' => $request->input('account_balance'),
            'account_type_id' => $request->input('account_type_id'),
            'currency_id' => $request->input('currency_id'),
            'branch_id' => $request->input('branch_id'),
            'created_at' => date('Y-m-d H:i:s'),
            'created_by' => 1,
            'updated_by' => 1,
        ]);
        return redirect()->route("accounts.index");
    }
public function store ( Request $ request ) { $ subjects = Account :: create ( [ 'customer_id' => $ request -> input ( 'customer_id' ) , 'account_number' => $ request -> input ( 'account_number' ) , 'account_balance' => $ request -> input ( 'account_balance' ) , 'account_type_id' => $ request -> input ( 'account_type_id' ) , 'currency_id' => $ request -> input ( 'currency_id' ) , 'branch_id' => $ request -> input ( 'branch_id' ) , 'created_at' => date ( 'Y-m-d H:i:s' ) , 'created_by' => 1 , 'updated_by' => 1 , ] ) ; return redirect ( ) -> route ( " accounts.index " ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .