create history api

This commit is contained in:
2025-11-26 13:53:22 +03:30
parent 6a8d27b2c3
commit 8fba75a684
7 changed files with 44 additions and 11 deletions

View File

@@ -26,7 +26,15 @@ class TechnicalDeputyController 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 3 THEN 1
WHEN 6 THEN 2
WHEN 14 THEN 3
ELSE 4
END
");
$data = DataTableFacade::run(
$query,