create history api
This commit is contained in:
@@ -35,7 +35,15 @@ class GeneralManagerController extends Controller
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$query = Harim::query()
|
||||
->where('province_id', '=', auth()->user()->province_id);
|
||||
->where('province_id', '=', auth()->user()->province_id)
|
||||
->orderByRaw("
|
||||
CASE state
|
||||
WHEN 4 THEN 1
|
||||
WHEN 7 THEN 2
|
||||
WHEN 15 THEN 3
|
||||
ELSE 4
|
||||
END
|
||||
");
|
||||
|
||||
$data = DataTableFacade::run(
|
||||
$query,
|
||||
@@ -178,7 +186,7 @@ class GeneralManagerController extends Controller
|
||||
|
||||
public function show(ShowRequest $request, Harim $harim): JsonResponse
|
||||
{
|
||||
return $this->successResponse($harim->load('histories'));
|
||||
return $this->successResponse($harim);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user