mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
fixBankInSlip
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\SettingBeneficiary;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SettingBeneficiaryController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return SettingBeneficiary::all();
|
||||
}
|
||||
|
||||
public function show($beneficiary)
|
||||
{
|
||||
if ($beneficiary == 0){
|
||||
response()->json(["company_name"=>"123", "account_number"=>"123"] , 201);
|
||||
}
|
||||
$beneficiary = SettingBeneficiary::find($beneficiary);
|
||||
return $beneficiary;
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$beneficiary = SettingBeneficiary::create($request->all());
|
||||
|
||||
return response()->json($beneficiary, 201);
|
||||
}
|
||||
|
||||
public function update(Request $request, SettingBeneficiary $beneficiary)
|
||||
{
|
||||
$beneficiary->update($request->all());
|
||||
|
||||
return response()->json($beneficiary, 200);
|
||||
}
|
||||
|
||||
public function delete(SettingBeneficiary $beneficiary)
|
||||
{
|
||||
$beneficiary->delete();
|
||||
|
||||
return response()->json(null, 204);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user