select box

This commit is contained in:
antv
2026-07-13 16:28:44 +07:00
parent f0a25b840c
commit 47a8892623
24 changed files with 889 additions and 302 deletions
@@ -146,6 +146,31 @@ class AdminController extends Controller
}
}
/**
* Delete card allocation history record.
*/
public function destroyAddCard(Request $request, int $id)
{
try {
$this->adminService->destroyAddCard($id);
if ($request->expectsJson()) {
return response()->json([
'success' => true,
'message' => 'Xóa lịch sử cấp phát thẻ thành công.',
]);
}
return redirect()->back()->with('success', 'Xóa lịch sử cấp phát thẻ thành công.');
} catch (\Exception $e) {
if ($request->expectsJson()) {
return response()->json([
'success' => false,
'message' => $e->getMessage(),
], 422);
}
return redirect()->back()->withErrors(['error' => $e->getMessage()]);
}
}
/**
* Reset all cards for active users.
*/