<?php

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

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

    //

    public function saveFeedback(Request $r){
        $data = $r->all();
        
        $insert = new Feedback();
        $insert['bank_code'] = $data['code'];
        $insert['name'] = $data['name'];
        $insert['address'] = $data['address'];
        $insert['contact_number'] = $data['contact_number'];
        $insert['service'] = $data['service'];
        $insert['rating'] = $data['rating'];
        $insert['suggestion'] = $data['suggestion'];
        

        $res = $insert->save();

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