<?php

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\LoanInquiry;

class InquiryController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    //

    public function saveLoanInquiry(Request $r){
        $data = $r->all();
        
        $insert = new LoanInquiry();
        $insert['bank_code'] = $data['code'];
        $insert['name'] = $data['name'];
        $insert['address'] = $data['address'];
        $insert['contact_number'] = $data['contact_number'];
        $insert['loan_type'] = $data['loan_type'];
        $insert['loan_amount_range'] = $data['loan_amount_range'];
        

        $res = $insert->save();

        
        return response()->json(['success'=>'true']);
    }
}
