mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 20:34:08 +00:00
40 lines
856 B
PHP
40 lines
856 B
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(SettingBeneficiary $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);
|
|
}
|
|
} |