mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
1497c50da5
added dynamic marking to supplier booking
44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?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);
|
|
}
|
|
} |