Files
cheerstothe_season_2.0/app/Services/APIs/CustomerAPIs/RulesApiServices.php
sayliraut 9a465b908e change
2024-06-20 18:49:52 +05:30

26 lines
598 B
PHP

<?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', 'title', '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);
}
}
}