update banyak
This commit is contained in:
@@ -12,6 +12,7 @@ use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Modules\Internal\Transformers\EncounterResource;
|
||||
|
||||
|
||||
class ClaimEncounterController extends Controller
|
||||
{
|
||||
/**
|
||||
@@ -31,6 +32,13 @@ class ClaimEncounterController extends Controller
|
||||
{
|
||||
return view('internal::create');
|
||||
}
|
||||
public function getAllData()
|
||||
{
|
||||
$encounters = Encounter::with('claim.member')->get();
|
||||
|
||||
return Helper::responseJson(data: EncounterResource::collection($encounters), message: 'Data berhasil diambil');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
@@ -255,6 +263,22 @@ class ClaimEncounterController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function x`counters($claim_id)
|
||||
{
|
||||
$claim = Claim::findOrFail($claim_id);
|
||||
$encounters = $claim->encounters()->get();
|
||||
return response()->json($encounters);
|
||||
}
|
||||
|
||||
public function getEncounterData($encounter_id)
|
||||
{
|
||||
$encounter = Encounter::with('claim.member')->findOrFail($encounter_id);
|
||||
|
||||
return Helper::responseJson(data: EncounterResource::make($encounter), message: 'Data berhasil diambil');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* @param int $id
|
||||
|
||||
Reference in New Issue
Block a user