26 lines
598 B
PHP
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);
|
|
}
|
|
}
|
|
}
|