<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:01:54
 namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use Firebase\JWT\Key; use Illuminate\Http\Request; use Illuminate\Support\Arr; use App\Group; use App\Http\Resources\Admin\GroupResource; use Validator; class GroupController extends Controller { const ITEM_PER_PAGE = 20; public function index(Request $request) { goto YOKSV; fP0RC: $yy6lp = Arr::get($VWRAC, "\153\145\x79\167\x6f\x72\144", ''); if (empty($yy6lp)) { goto PzGw6; } $Gl9WT->where("\156\141\155\145", "\114\x49\113\x45", "\45" . $yy6lp . "\x25"); goto k9Q9t; YOKSV: $VWRAC = $request->all(); $Gl9WT = Group::notDeleted(); $K23m5 = Arr::get($VWRAC, "\x6c\x69\155\151\164", static::ITEM_PER_PAGE); goto fP0RC; k9Q9t: PzGw6: $Gl9WT->orderBy("\x69\x64"); return GroupResource::collection($Gl9WT->paginate($K23m5)); goto VT32q; VT32q: } public function all() { $Gl9WT = Group::select("\151\144", "\156\x61\155\x65")->notDeleted()->orderBy("\151\x64"); return GroupResource::collection($Gl9WT->get()); } public function show($bBSBm = 0) { $Dn3kE = Group::notDeleted()->where("\151\x64", $bBSBm)->first(); if (isset($Dn3kE)) { goto EaxLJ; } return response()->json(["\x65\162\x72\x6f\162\163" => "\x47\162\157\165\160\40\151\x73\40\x6e\157\164\x20\166\x61\154\151\x64"], 403); EaxLJ: return new GroupResource($Dn3kE); } public function store(Request $request) { goto KG71G; Jqi9z: BQcK5: $params = $request->all(); $PiUEP = Group::where("\x6e\x61\155\x65", trim($params["\x6e\x61\155\x65"]))->where("\x69\163\x5f\x64\x65\154\145\x74\x65\144", false)->first(); goto DU7gB; JBUIw: $Dn3kE = Group::create(["\x6e\141\155\x65" => $params["\156\x61\155\x65"], "\x70\157\151\156\164\137\162\x61\164\145" => $params["\x70\157\x69\156\x74\x5f\162\141\164\x65"], "\x70\157\x69\156\x74\137\x74\x6f\x5f\155\x6f\156\145\x79" => $params["\160\157\151\x6e\x74\x5f\164\x6f\137\x6d\x6f\x6e\x65\x79"], "\144\151\163\143\157\165\156\x74\137\x6d\157\162\x65" => $params["\x64\151\163\143\157\x75\x6e\x74\x5f\x6d\157\x72\145"], "\143\162\145\141\164\145\x64\137\x61\164" => date("\x59\x2d\155\55\x64\x20\x48\72\x69\x3a\163"), "\x75\160\144\141\164\x65\144\x5f\x61\164" => date("\131\x2d\x6d\55\x64\40\110\72\x69\72\163")]); return new GroupResource($Dn3kE); goto l0YeH; KG71G: $XP5Fg = Validator::make($request->all(), ["\x6e\141\155\145" => ["\162\x65\161\165\x69\x72\145\x64"], "\x69\x73\137\x61\143\164\x69\166\141\164\x65\144" => ["\162\x65\161\x75\151\x72\145\144"]]); if (!$XP5Fg->fails()) { goto BQcK5; } return response()->json(["\x65\162\162\x6f\x72\x73" => $XP5Fg->errors()], 403); goto Jqi9z; DU7gB: if (!(isset($PiUEP) && $PiUEP->id != null)) { goto FrNQQ; } return response()->json(["\x64\141\x74\141" => ["\x73\x74\141\164\165\163" => "\x65\162\162\x6f\x72", "\x6d\145\163\163\x61\147\145" => "\107\162\x6f\x75\160\x20\141\154\x72\145\x61\x64\171\x20\145\170\x69\x73\x74\x73\x2e"]], 200); FrNQQ: goto JBUIw; l0YeH: } public function update($bBSBm = 0, Request $request) { goto obpiW; g2s44: return response()->json(["\x65\x72\162\x6f\x72\163" => "\x47\162\x6f\165\x70\40\151\x73\40\x6e\x6f\164\x20\x76\x61\154\151\144"], 403); QUCjB: $params = $request->all(); goto a9SXZ; rAb8C: fpEcL: $Dn3kE = Group::notDeleted()->where("\151\x64", $bBSBm)->first(); if (isset($Dn3kE)) { goto QUCjB; } goto g2s44; a9SXZ: $PiUEP = Group::where("\x6e\x61\x6d\145", $params["\x6e\141\155\145"])->where("\151\x73\x5f\144\x65\154\x65\164\x65\x64", false)->where("\151\144", "\x21\x3d", $Dn3kE->id)->first(); if (!(isset($PiUEP) && $PiUEP->id != null)) { goto lIKbH; } return response()->json(["\144\141\164\x61" => ["\163\164\x61\164\x75\163" => "\x65\162\x72\157\162", "\155\x65\163\x73\141\147\x65" => "\107\162\x6f\165\160\40\141\x6c\x72\145\141\144\171\x20\x65\170\x69\x73\x74\x73\56"]], 200); goto wMGL0; wMGL0: lIKbH: $Dn3kE->update(["\156\141\155\145" => $params["\x6e\141\x6d\x65"], "\x70\157\151\156\x74\x5f\162\141\x74\x65" => $params["\x70\x6f\151\x6e\x74\x5f\x72\x61\164\x65"], "\x70\157\x69\x6e\164\137\x74\157\137\x6d\x6f\x6e\145\x79" => $params["\160\x6f\151\156\x74\137\164\157\x5f\155\157\x6e\x65\x79"], "\144\151\163\x63\x6f\x75\x6e\x74\137\x6d\x6f\x72\145" => $params["\x64\x69\163\143\x6f\x75\x6e\x74\137\155\x6f\x72\x65"], "\x75\160\x64\141\164\145\144\x5f\x61\164" => date("\131\x2d\x6d\55\x64\x20\110\x3a\151\x3a\163")]); return response()->json(null, 204); goto xiuKb; obpiW: $XP5Fg = Validator::make($request->all(), ["\156\141\155\145" => ["\162\145\x71\x75\x69\x72\145\144"], "\x69\x73\137\x61\143\x74\151\166\x61\x74\x65\x64" => ["\x72\145\x71\x75\x69\162\145\x64"]]); if (!$XP5Fg->fails()) { goto fpEcL; } return response()->json(["\x65\x72\162\x6f\162\x73" => $XP5Fg->errors()], 403); goto rAb8C; xiuKb: } public function destroy($bBSBm = 0) { $Dn3kE = Group::notDeleted()->where("\x69\x64", $bBSBm)->first(); if (isset($Dn3kE)) { goto X_aVG; } response()->json(["\x65\162\162\x6f\162" => "\x45\x68\150\150\x21\x20\103\141\x6e\40\x6e\x6f\x74\40\x64\x65\154\x65\164\145\40\164\x68\151\x73\40\x67\162\x6f\165\x70"], 403); X_aVG: try { $Dn3kE->update(["\151\163\137\x64\x65\154\x65\164\145\144" => true]); } catch (\Exception $BX8v2) { response()->json(["\x65\162\162\157\162" => $BX8v2->getMessage()], 403); } return response()->json(null, 204); } public function destroyMultiple(Request $request) { goto Xq4xG; useDa: try { Group::notDeleted()->whereIn("\151\144", $UP9Hp)->update(["\x69\x73\x5f\144\x65\x6c\145\164\x65\x64" => true]); } catch (\Exception $BX8v2) { response()->json(["\x65\x72\162\157\162" => $BX8v2->getMessage()], 403); } return response()->json(null, 204); goto YhyN3; sHFjI: if (!($tBKeI->count() <= 0)) { goto Oc8HA; } response()->json(["\x65\x72\162\157\162" => "\x47\x72\x6f\x75\x70\x20\x69\x73\x20\156\x6f\164\x20\x76\x61\154\x69\144\x2e"], 403); Oc8HA: goto useDa; WgYub: EQlz9: $UP9Hp = $request->get("\x69\x64\163", []); $tBKeI = Group::notDeleted()->whereIn("\x69\x64", $UP9Hp)->get(); goto sHFjI; Xq4xG: $XP5Fg = Validator::make($request->all(), ["\x69\x64\163" => "\x72\x65\161\165\x69\x72\145\144"]); if (!$XP5Fg->fails()) { goto EQlz9; } return response()->json(["\145\x72\x72\x6f\x72\x73" => $XP5Fg->errors()], 403); goto WgYub; YhyN3: } public function activateMultiple(Request $request) { goto ToyEw; CErep: FFUp_: $UP9Hp = $request->get("\151\144\x73", []); $tBKeI = Group::notDeleted()->whereIn("\151\144", $UP9Hp)->get(); goto NBR3O; u_R0X: try { Group::notDeleted()->whereIn("\x69\144", $UP9Hp)->update(["\x69\163\x5f\x61\143\x74\151\x76\x61\164\145\144" => true]); } catch (\Exception $BX8v2) { response()->json(["\145\x72\x72\157\x72" => $BX8v2->getMessage()], 403); } return response()->json(null, 204); goto OiZlX; NBR3O: if (!($tBKeI->count() <= 0)) { goto abokv; } response()->json(["\x65\162\x72\157\x72" => "\x47\x72\x6f\165\160\40\x69\163\x20\156\x6f\164\x20\166\141\154\151\144\x2e"], 403); abokv: goto u_R0X; ToyEw: $XP5Fg = Validator::make($request->all(), ["\x69\x64\x73" => "\162\x65\x71\165\x69\x72\145\144"]); if (!$XP5Fg->fails()) { goto FFUp_; } return response()->json(["\x65\162\x72\x6f\162\x73" => $XP5Fg->errors()], 403); goto CErep; OiZlX: } public function deactivateMultiple(Request $request) { goto ax9P3; ax9P3: $XP5Fg = Validator::make($request->all(), ["\x69\x64\x73" => "\162\x65\161\165\151\162\145\x64"]); if (!$XP5Fg->fails()) { goto x1pg2; } return response()->json(["\x65\162\162\x6f\x72\x73" => $XP5Fg->errors()], 403); goto ra03k; YIqKQ: try { Group::notDeleted()->whereIn("\x69\x64", $UP9Hp)->update(["\151\x73\137\x61\143\x74\151\x76\141\164\x65\144" => false]); } catch (\Exception $BX8v2) { response()->json(["\x65\162\162\x6f\162" => $BX8v2->getMessage()], 403); } return response()->json(null, 204); goto CVA9R; ra03k: x1pg2: $UP9Hp = $request->get("\151\x64\163", []); $tBKeI = Group::notDeleted()->whereIn("\x69\x64", $UP9Hp)->get(); goto T4XNy; T4XNy: if (!($tBKeI->count() <= 0)) { goto LFLUX; } response()->json(["\x65\162\162\157\x72" => "\x47\x72\x6f\165\x70\x20\151\163\x20\x6e\157\x74\x20\x76\x61\154\x69\x64\x2e"], 403); LFLUX: goto YIqKQ; CVA9R: } }