<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Reaction;

class ReactController extends Controller
{
    public function index(Request $request)
    {
        $reaction = new Reaction();
        $reaction->reaction = $request->reacao;
        $reaction->cliente = $request->nome;;
        $reaction->motivo = $request->motivo;;
        $reaction->loja_id = 1;
        //$reaction->save();
        try {
            $reaction->save();
            return response()->json(['sucess'=>true]);
        } catch (\Throwable $th) {

        }
    }
}
