<?php

namespace App\Services\APIs\CustomerAPIs;

use App\Models\ManageRule;
use Illuminate\Support\Facades\Log;

use Exception;

class RulesApiServices
{
    public function getVoucherRules()
    {
        try {
            $data = ManageRule::select('id', 'message')
                ->get()
                ->toArray();

            return $data;
        } catch (Exception $ex) {
            Log::error('Voucher rules and regulation Get service failed : ' . $ex->getMessage());
            return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
        }
    }
}
