<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:01:52
 namespace App\Http\Controllers\Admin; use App\Article; use App\Http\Resources\UserResource; use App\Laravue\Models\Role; use App\Laravue\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Arr; use App\Http\Resources\Admin\CareResource; use App\Http\Controllers\Controller; use App\Helpers\Helper; use App\Care; use Illuminate\Support\Facades\Hash; use Validator; use Auth; class CareController extends Controller { const ITEM_PER_PAGE = 20; protected $_pathFile; protected $_pathTemp; public function __construct() { $this->_pathFile = public_path("\x75\160\x6c\157\141\144\163\57\151\155\141\x67\145\57\141\x72\164\x69\143\x6c\145\57"); $this->_pathTemp = storage_path("\141\160\x70\x2f\x70\165\x62\x6c\x69\x63\x2f\x75\160\154\x6f\x61\144\x73\x2f\x74\x65\155\160\57\151\155\141\147\145\57"); } public function index(Request $request) { goto GKNDz; H9HTX: if (!($FpIOB != '' && $FpIOB != null)) { goto LD2K7; } $hgkah->where(function ($xmTTX) use($FpIOB) { $xmTTX->where("\156\x61\x6d\x65", "\114\111\x4b\105", "\45" . $FpIOB . "\x25")->orWhere("\145\155\x61\x69\154", "\x4c\111\x4b\105", "\45" . $FpIOB . "\45"); }); LD2K7: goto YZSfw; vXxJq: $RyY5U = "\156\165\162\x73\151\x6e\147\x73\x74\141\146\x66"; $FpIOB = Arr::get($hzpLG, "\x6b\x65\x79\x77\x6f\x72\x64", ''); $hgkah->whereHas("\162\x6f\x6c\x65\163", function ($bx4FQ) use($RyY5U) { $bx4FQ->where("\x6e\141\x6d\145", $RyY5U); }); goto H9HTX; YZSfw: $hgkah->orderBy("\x69\x64", "\104\x45\123\103"); return CareResource::collection($hgkah->paginate($ZQtw0)); goto LhTBm; GKNDz: $hzpLG = $request->all(); $hgkah = User::query(); $ZQtw0 = Arr::get($hzpLG, "\154\x69\155\x69\164", static::ITEM_PER_PAGE); goto vXxJq; LhTBm: } public function all() { $GbnBn = Care::select("\x69\144", "\x74\151\x74\x6c\x65", "\163\154\x75\x67")->notDeleted()->orderBy("\x69\x64"); return CareResource::collection($GbnBn->get()); } public function show(User $ltolF) { $MoqnH = User::select("\x69\144")->where("\151\x64", $ltolF->id)->whereHas("\162\157\154\145\163", function ($bx4FQ) { $bx4FQ->where("\156\141\155\x65", "\156\x75\162\x73\151\x6e\x67\163\x74\141\x66\x66"); })->first(); if (!($MoqnH === null || !isset($MoqnH->id))) { goto hlAP3; } return response()->json(["\145\162\162\x6f\162" => "\125\163\145\x72\40\156\157\x74\40\146\157\165\156\144"], 404); hlAP3: return new CareResource($ltolF); } public function store(Request $request) { goto Ndzo3; wDQrF: if (!($qJuM7 && $qJuM7->id !== null)) { goto G21t1; } return response()->json(["\145\162\x72\x6f\162" => "\x45\x6d\x61\x69\x6c\x20\x68\x61\x73\x20\142\145\x65\156\x20\x74\141\153\x65\x6e"], 403); G21t1: goto BkkM3; q4dp2: if (!($tZWiv && $tZWiv->id !== null)) { goto woJ09; } return response()->json(["\145\x72\162\157\162" => "\x55\x72\x6c\x20\x68\x61\x73\40\x62\145\x65\156\x20\x74\141\153\x65\x6e"], 403); woJ09: goto fKq5h; fKq5h: $ltolF = User::create(["\156\x61\155\x65" => $params["\156\141\155\x65"], "\163\x6c\165\147" => $iZZ0B, "\146\165\154\x6c\137\156\x61\x6d\x65" => $params["\x66\165\154\x6c\137\156\141\x6d\x65"], "\x66\165\x72\151\x67\141\156\x61\137\x6e\x61\x6d\145" => $params["\146\x75\x72\x69\147\x61\156\x61\x5f\156\x61\x6d\x65"], "\147\145\156\144\145\x72" => $params["\x67\145\156\144\145\x72"], "\141\144\144\x72\x65\163\x73" => $params["\x61\x64\144\162\145\163\163"], "\x65\x6d\x61\151\x6c" => $params["\145\x6d\x61\151\x6c"], "\x70\x61\163\x73\167\x6f\162\144" => Hash::make($params["\160\141\x73\x73\167\157\162\144"]), "\x70\x68\157\x6e\145\137\156\x75\x6d\x62\x65\x72" => $params["\x70\150\x6f\156\x65\137\156\x75\x6d\x62\x65\162"], "\x61\166\x61\164\141\x72" => $params["\x61\166\x61\164\141\x72"], "\x63\x6f\165\156\163\145\x6c\x69\156\147\x5f\x69\144" => $params["\x63\157\x75\x6e\x73\145\x6c\x69\156\147\137\151\x64"], "\143\141\162\x65\145\x72" => $params["\143\x61\162\145\x65\x72"], "\161\x75\x61\154\151\146\x69\143\141\164\151\x6f\x6e" => $params["\161\165\x61\x6c\151\x66\x69\143\141\164\151\x6f\156"], "\x69\x6e\x74\162\x6f\144\165\143\164\151\x6f\156" => $params["\x69\x6e\x74\x72\x6f\x64\165\x63\x74\x69\x6f\x6e"], "\143\x72\x65\141\x74\x65\x64\137\142\171" => auth("\141\x70\151")->user()->id, "\143\162\145\x61\x74\145\x64\x5f\141\164" => date("\x59\55\x6d\55\x64\40\x48\x3a\x69\x3a\x73"), "\165\x70\x64\x61\x74\145\x64\137\141\x74" => date("\131\55\x6d\x2d\x64\x20\x48\x3a\151\72\163")]); $RyY5U = Role::findByName("\x6e\165\x72\163\x69\x6e\147\x73\164\141\146\146"); $ltolF->syncRoles($RyY5U); goto Di8BN; TWy08: fJW8r: $Fobjq = $request->get("\145\x6d\x61\151\x6c"); $qJuM7 = User::where("\145\x6d\141\x69\x6c", $Fobjq)->first(); goto wDQrF; BkkM3: $params = $request->all(); $iZZ0B = Helper::slug($params["\x73\154\x75\147"]); if (!empty($iZZ0B)) { goto m0lpx; } goto kos1K; Di8BN: return new CareResource($ltolF); goto jmHe0; Ndzo3: $yURBe = Validator::make($request->all(), ["\x6e\x61\x6d\x65" => ["\x72\x65\161\165\151\x72\145\x64"], "\x73\x6c\x75\147" => ["\162\145\161\165\x69\162\x65\x64"], "\146\x75\154\x6c\137\x6e\x61\x6d\x65" => ["\162\x65\x71\x75\x69\x72\x65\x64"], "\x66\165\x72\x69\147\141\156\x61\137\156\x61\155\x65" => ["\x72\145\x71\x75\x69\162\x65\144"], "\x65\x6d\141\x69\x6c" => ["\162\x65\x71\x75\151\162\145\144"], "\x63\x6f\x75\156\163\x65\154\151\x6e\x67\x5f\x69\144" => ["\162\x65\x71\x75\x69\162\145\x64"], "\x70\141\x73\x73\167\x6f\x72\144" => ["\x72\145\161\x75\x69\162\x65\144", "\155\151\x6e\x3a\66"], "\x63\x6f\x6e\146\x69\162\155\120\141\x73\x73\167\x6f\x72\x64" => "\x73\141\x6d\145\72\160\141\x73\163\167\x6f\162\144"]); if (!$yURBe->fails()) { goto fJW8r; } return response()->json(["\145\x72\162\x6f\162\x73" => $yURBe->errors()], 403); goto TWy08; kos1K: $iZZ0B = Helper::slug($params["\x6e\141\155\145"]); m0lpx: $tZWiv = User::where("\163\154\165\147", $iZZ0B)->first(); goto q4dp2; jmHe0: } public function update(Request $request, User $ltolF) { goto RQ3G0; qtDPR: if (!($qJuM7 && $qJuM7->id !== $ltolF->id)) { goto tt4OH; } return response()->json(["\145\x72\162\x6f\162" => "\105\x6d\141\x69\x6c\40\x68\141\163\40\x62\145\x65\x6e\x20\x74\141\153\x65\156"], 403); tt4OH: goto ahvnC; RQ3G0: if (!($ltolF === null)) { goto Ys3vd; } return response()->json(["\145\x72\x72\157\162" => "\125\x73\x65\x72\x20\x6e\x6f\x74\40\x66\x6f\165\156\x64"], 404); Ys3vd: goto cwo1m; ahvnC: $params = $request->all(); $iZZ0B = Helper::slug($params["\x73\x6c\165\x67"]); if (!empty($iZZ0B)) { goto MG2VB; } goto MQVxq; gBdsA: $yURBe = Validator::make($request->all(), ["\156\141\155\145" => ["\162\145\161\165\151\x72\145\x64"], "\x73\154\165\147" => ["\x72\x65\161\165\151\x72\145\x64"], "\x66\165\154\x6c\137\x6e\141\x6d\145" => ["\162\145\x71\x75\x69\x72\x65\x64"], "\146\165\162\151\147\141\156\x61\137\x6e\141\155\145" => ["\x72\x65\161\165\x69\x72\x65\144"], "\x65\155\141\x69\x6c" => ["\162\145\x71\165\151\162\145\144"], "\143\x6f\165\x6e\163\x65\x6c\x69\156\x67\137\x69\144" => ["\x72\145\x71\165\x69\162\x65\144"]]); if (!$yURBe->fails()) { goto PWETz; } return response()->json(["\145\162\x72\x6f\162\x73" => $yURBe->errors()], 403); goto Z4a0Q; MQVxq: $iZZ0B = Helper::slug($params["\156\x61\x6d\x65"]); MG2VB: $tZWiv = User::where("\163\154\x75\147", $iZZ0B)->first(); goto Dz8Vr; Z4a0Q: PWETz: $Fobjq = $request->get("\145\x6d\141\151\x6c"); $qJuM7 = User::where("\145\x6d\141\151\x6c", $Fobjq)->first(); goto qtDPR; cwo1m: if (!$ltolF->isAdmin()) { goto uzh1H; } return response()->json(["\145\x72\x72\x6f\162" => "\101\x64\x6d\x69\x6e\x20\x63\141\156\40\x6e\157\x74\40\x62\x65\40\x6d\x6f\x64\x69\146\x69\x65\144"], 403); uzh1H: goto gBdsA; Dz8Vr: if (!($tZWiv && $tZWiv->id !== $ltolF->id)) { goto EEPQg; } return response()->json(["\145\162\162\157\x72" => "\125\162\154\x20\150\x61\163\x20\142\x65\145\x6e\x20\164\141\x6b\x65\x6e"], 403); EEPQg: goto O2Sjn; O2Sjn: $ltolF->update(["\x6e\x61\155\x65" => $params["\156\141\155\145"], "\163\154\x75\x67" => $iZZ0B, "\x66\x75\154\154\x5f\x6e\x61\x6d\x65" => $params["\146\x75\154\x6c\x5f\156\x61\155\145"], "\146\165\162\x69\147\x61\x6e\141\x5f\156\141\x6d\x65" => $params["\146\165\162\151\x67\x61\x6e\141\137\156\x61\155\x65"], "\x67\x65\156\144\145\162" => $params["\x67\x65\x6e\144\145\x72"], "\141\144\144\162\145\163\163" => $params["\x61\x64\144\162\x65\x73\163"], "\145\155\x61\x69\154" => $params["\145\x6d\141\151\x6c"], "\x70\150\x6f\x6e\x65\137\156\x75\x6d\142\145\x72" => $params["\160\150\x6f\x6e\x65\x5f\x6e\165\x6d\142\145\162"], "\x61\166\141\164\x61\x72" => $params["\x61\x76\x61\x74\141\162"], "\143\x6f\x75\x6e\x73\x65\154\151\x6e\x67\137\x69\144" => $params["\x63\x6f\165\x6e\x73\145\x6c\151\x6e\x67\x5f\x69\x64"], "\143\x61\x72\x65\x65\162" => $params["\143\141\162\145\x65\162"], "\161\x75\141\x6c\x69\x66\151\143\x61\164\151\x6f\156" => $params["\x71\x75\x61\154\151\x66\151\143\141\164\x69\157\156"], "\151\x6e\164\162\157\144\x75\x63\x74\151\x6f\x6e" => $params["\x69\x6e\164\162\x6f\x64\x75\x63\x74\151\x6f\x6e"], "\x75\160\144\141\x74\145\x64\x5f\x61\x74" => date("\131\x2d\155\55\144\x20\110\x3a\x69\72\163")]); return response()->json(null, 204); goto WEcwC; WEcwC: } public function destroy(User $ltolF) { if (!$ltolF->isAdmin()) { goto NEw13; } response()->json(["\x65\x72\x72\x6f\162" => "\105\150\x68\150\41\40\103\x61\x6e\40\156\157\164\x20\144\145\154\x65\164\x65\40\x61\144\155\151\156\x20\x75\x73\145\162"], 403); NEw13: try { $ltolF->delete(); Article::where("\165\x73\145\x72\137\x69\x64", $ltolF->id)->update(["\x75\x73\x65\x72\x5f\151\x64" => 1]); } catch (\Exception $uVgwo) { response()->json(["\x65\162\162\x6f\x72" => $uVgwo->getMessage()], 403); } return response()->json(null, 204); } public function destroyMultiple(Request $request) { goto mJ4Jc; Hqutv: if (!($hkL9K->count() <= 0)) { goto LBeU1; } response()->json(["\145\162\162\157\162" => "\116\165\162\x73\151\x6e\x67\x20\123\164\141\146\x66\x20\151\163\40\x6e\157\x74\x20\x76\141\154\151\144\56"], 403); LBeU1: goto l4BxC; j03gb: c1boh: $Ch_ur = $request->get("\x69\x64\x73", []); $hkL9K = User::whereIn("\x69\144", $Ch_ur)->whereHas("\162\157\x6c\145\x73", function ($bx4FQ) { $bx4FQ->where("\x6e\x61\155\145", "\156\165\162\x73\151\x6e\147\163\x74\141\x66\x66"); })->get(); goto Hqutv; mJ4Jc: $yURBe = Validator::make($request->all(), ["\151\x64\x73" => "\x72\145\x71\x75\x69\162\x65\x64"]); if (!$yURBe->fails()) { goto c1boh; } return response()->json(["\x65\x72\162\x6f\162\163" => $yURBe->errors()], 403); goto j03gb; l4BxC: try { User::whereIn("\x69\x64", $Ch_ur)->whereHas("\162\x6f\x6c\x65\163", function ($bx4FQ) { $bx4FQ->where("\x6e\x61\155\145", "\156\165\162\x73\151\156\147\163\164\141\x66\146"); })->delete(); Article::whereIn("\x75\x73\145\162\137\151\x64", $Ch_ur)->update(["\165\163\x65\x72\137\151\144" => 1]); } catch (\Exception $uVgwo) { response()->json(["\145\x72\162\157\162" => $uVgwo->getMessage()], 403); } return response()->json(null, 204); goto DQzkq; DQzkq: } public function activateMultiple(Request $request) { goto HR6Il; HR6Il: $yURBe = Validator::make($request->all(), ["\151\x64\163" => "\x72\145\161\x75\x69\162\145\x64"]); if (!$yURBe->fails()) { goto e1RE5; } return response()->json(["\145\162\162\x6f\162\x73" => $yURBe->errors()], 403); goto pos1h; ZpgU7: if (!($hkL9K->count() <= 0)) { goto oB4d7; } response()->json(["\x65\162\x72\157\162" => "\x4e\x75\162\x73\x69\x6e\x67\x20\x53\x74\141\146\146\40\151\163\x20\156\157\x74\40\x76\141\154\151\x64\56"], 403); oB4d7: goto qlZLf; pos1h: e1RE5: $Ch_ur = $request->get("\151\144\163", []); $hkL9K = Care::notDeleted()->whereIn("\151\144", $Ch_ur)->get(); goto ZpgU7; qlZLf: try { Care::notDeleted()->whereIn("\x69\x64", $Ch_ur)->update(["\x69\163\137\x61\x63\164\x69\166\141\164\145\x64" => true]); } catch (\Exception $uVgwo) { response()->json(["\x65\x72\x72\157\162" => $uVgwo->getMessage()], 403); } return response()->json(null, 204); goto zuC4K; zuC4K: } public function deactivateMultiple(Request $request) { goto UiHJx; OlcSV: if (!($hkL9K->count() <= 0)) { goto v8Yg5; } response()->json(["\x65\x72\162\157\162" => "\116\165\162\163\151\x6e\x67\x20\x53\164\x61\x66\146\40\151\163\40\156\157\x74\x20\166\x61\154\x69\x64\56"], 403); v8Yg5: goto HqyPc; HqyPc: try { Care::notDeleted()->whereIn("\x69\144", $Ch_ur)->update(["\151\163\x5f\141\143\164\x69\166\141\164\145\144" => false]); } catch (\Exception $uVgwo) { response()->json(["\145\162\x72\157\x72" => $uVgwo->getMessage()], 403); } return response()->json(null, 204); goto rBVyS; W457S: FpE_b: $Ch_ur = $request->get("\x69\x64\x73", []); $hkL9K = Care::notDeleted()->whereIn("\x69\x64", $Ch_ur)->get(); goto OlcSV; UiHJx: $yURBe = Validator::make($request->all(), ["\x69\x64\x73" => "\162\145\161\165\x69\x72\145\x64"]); if (!$yURBe->fails()) { goto FpE_b; } return response()->json(["\145\x72\162\x6f\x72\163" => $yURBe->errors()], 403); goto W457S; rBVyS: } public function uploadImage(Request $request) { goto yowpI; PfcJK: return response()->json(["\x73\164\x61\x74\x75\x73" => "\x73\x75\143\143\145\x73\x73", "\155\145\163\163\x61\147\145" => "\125\x70\x6c\157\x61\144\40\x53\x75\143\x63\145\163\163\56", "\x66\x69\x6c\x65\x5f\156\x61\x6d\x65" => $r9HoI, "\x62\x61\163\x65\x4e\x61\x6d\145" => $q41Ed], 200); XAdwp: return response()->json(["\163\x74\141\x74\165\x73" => "\x65\162\162\157\x72", "\155\145\x73\x73\141\x67\145" => "\x55\x70\x6c\x6f\x61\x64\40\x46\x61\151\154\x2e", "\146\151\154\145\137\156\141\155\145" => null], 403); goto zCXxp; ekANM: $r9HoI = md5($q41Ed . rand(1111, 9999) . date("\x59\155\x64\x48\x69\163")) . "\x2e" . $yWuRr->getClientOriginalExtension(); $yWuRr->move($this->_pathTemp, $r9HoI); chmod($this->_pathTemp . $r9HoI, 0777); goto PfcJK; yowpI: if (!$request->hasFile("\151\155\x61\147\145")) { goto XAdwp; } $yWuRr = $request->file("\151\x6d\141\x67\x65"); $q41Ed = $yWuRr->getClientOriginalName(); goto ekANM; zCXxp: } public function uploadImages(Request $request) { goto KQEH3; KQEH3: if (!$request->hasFile("\146\151\154\x65")) { goto Tk2Y4; } $yWuRr = $request->file("\146\x69\x6c\x65"); $q41Ed = $yWuRr->getClientOriginalName(); goto dEFzG; dEFzG: $r9HoI = md5($q41Ed . rand(1111, 9999) . date("\x59\x6d\144\110\151\163")) . "\56" . $yWuRr->getClientOriginalExtension(); $yWuRr->move($this->_pathFile, $r9HoI); chmod($this->_pathFile . $r9HoI, 0777); goto MNiEb; MNiEb: return response()->json(["\x68\x61\163\123\165\143\143\x65\163\x73" => true, "\155\145\x73\x73\141\x67\x65" => "\x55\x70\154\157\x61\x64\x20\123\x75\143\143\145\163\163\56", "\x66\151\x6c\x65\137\156\141\x6d\x65" => $r9HoI, "\142\x61\x73\x65\x4e\x61\x6d\145" => $q41Ed, "\146\x69\x6c\145\163" => ["\146\151\x6c\145" => $r9HoI]], 200); Tk2Y4: return response()->json(["\x68\141\163\123\165\x63\143\145\163\163" => false, "\155\x65\x73\163\x61\x67\x65" => "\x55\x70\x6c\157\x61\144\40\x46\141\151\154\56", "\146\x69\154\x65\137\156\141\155\145" => null, "\x66\151\154\x65\x73" => null], 403); goto i3lPV; i3lPV: } }