mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
26 lines
698 B
PHP
26 lines
698 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\SettingBillingCharge;
|
|
|
|
class SettingBillingChargeController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$billing_charge_setting = SettingBillingCharge::latest()->first();
|
|
return response()->json($billing_charge_setting, 201);
|
|
}
|
|
|
|
public function update(Request $request)
|
|
{
|
|
if($billing_charge_setting = SettingBillingCharge::latest()->first())
|
|
$billing_charge_setting->update($request->all());
|
|
else
|
|
$billing_charge_setting = SettingBillingCharge::create($request->all());
|
|
|
|
return response()->json($billing_charge_setting, 200);
|
|
}
|
|
}
|