<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:01:52
 namespace App\Http\Controllers\Admin; use Illuminate\Http\Request; use Illuminate\Support\Arr; use App\Helpers\Helper; use App\Http\Controllers\Controller; use App\Http\Resources\Admin\CounselingResource; use App\Counseling; use Validator; class CounselingController extends Controller { const ITEM_PER_PAGE = 20; protected $_pathFile; protected $_pathTemp; public function __construct() { $this->_pathFile = public_path("\x75\160\154\157\x61\144\x73\x2f\146\x69\154\x65\x73\57"); $this->_pathTemp = storage_path("\x61\160\x70\57\x70\165\142\154\x69\143\x2f\x75\160\154\157\x61\x64\163\x2f\x74\x65\155\x70\x2f\x69\x6d\x61\x67\x65\x2f"); } public function index(Request $request) { goto ffdaL; WmAYA: $wZM6w->where("\x69\x73\x5f\141\143\164\151\x76\141\x74\x65\144", $PC5t0); YCZy_: $wZM6w->orderBy("\x69\x64", "\101\123\x43"); goto bXk2W; NJ4dC: $wZM6w->where("\164\x69\164\154\x65", "\x4c\111\x4b\105", "\45" . $AvRUZ . "\45"); yiPoZ: if (!($PC5t0 != '')) { goto YCZy_; } goto WmAYA; SJUKX: $AvRUZ = Arr::get($JOKv9, "\153\x65\x79\167\x6f\162\144", ''); $PC5t0 = Arr::get($JOKv9, "\x73\164\141\164\165\x73", ''); if (empty($AvRUZ)) { goto yiPoZ; } goto NJ4dC; bXk2W: return CounselingResource::collection($wZM6w->paginate($kXRQW)); goto zsXYs; ffdaL: $JOKv9 = $request->all(); $wZM6w = Counseling::notDeleted(); $kXRQW = Arr::get($JOKv9, "\154\151\x6d\x69\x74", static::ITEM_PER_PAGE); goto SJUKX; zsXYs: } public function all() { $wZM6w = Counseling::select("\x69\x64", "\164\x69\164\154\145", "\x73\x6c\x75\x67", "\144\145\163\143\x72\151\160\164\x69\x6f\156")->notDeleted()->orderBy("\x69\144"); return CounselingResource::collection($wZM6w->get()); } public function show($NbsCI = 0) { $BzV1q = Counseling::notDeleted()->where("\x69\x64", $NbsCI)->first(); if (isset($BzV1q)) { goto WsOpV; } return response()->json(["\145\162\162\157\x72\x73" => "\103\157\x75\x6e\x73\x65\x6c\x69\x6e\147\40\x69\x73\40\156\157\164\40\166\141\154\x69\x64"], 403); WsOpV: return new CounselingResource($BzV1q); } public function store(Request $request) { goto F4XTX; XIwou: O8KhA: $params = $request->all(); $BzV1q = Counseling::create(["\x74\151\164\154\145" => $params["\x74\151\x74\154\145"], "\163\154\165\x67" => Helper::slug($params["\164\151\164\x6c\x65"]), "\x64\145\163\x63\162\151\x70\x74\x69\157\x6e" => $params["\144\145\x73\x63\x72\151\160\x74\151\157\x6e"], "\x63\x6f\x6e\x74\145\x6e\164" => $params["\143\x6f\156\x74\145\x6e\164"], "\x74\150\165\x6d\142\x6e\141\151\x6c" => $params["\x74\150\x75\x6d\x62\156\141\151\x6c"], "\x6e\157\164\145" => $params["\x6e\157\x74\145"], "\x69\x73\x5f\141\143\x74\x69\166\x61\164\145\x64" => $params["\x69\x73\137\141\x63\164\x69\x76\x61\164\x65\x64"] === true ? 1 : 0, "\143\162\x65\x61\x74\145\144\137\141\164" => date("\x59\55\x6d\x2d\x64\40\x48\x3a\x69\x3a\163"), "\x75\x70\x64\141\164\145\144\x5f\x61\164" => date("\x59\x2d\x6d\55\x64\x20\x48\72\x69\72\x73")]); goto MvuRT; MvuRT: return new CounselingResource($BzV1q); goto t7mfx; F4XTX: $gQI8J = Validator::make($request->all(), ["\x74\x69\x74\x6c\x65" => ["\x72\x65\161\x75\x69\162\145\x64"], "\144\x65\x73\x63\162\x69\160\164\x69\157\x6e" => ["\162\145\x71\x75\151\162\145\144"], "\151\x73\137\x61\x63\x74\x69\x76\141\x74\145\144" => ["\x72\145\x71\165\151\x72\145\x64"]]); if (!$gQI8J->fails()) { goto O8KhA; } return response()->json(["\145\x72\162\157\x72\163" => $gQI8J->errors()], 403); goto XIwou; t7mfx: } public function update($NbsCI = 0, Request $request) { goto MRuSR; odvku: return response()->json(["\x65\x72\x72\157\162\163" => "\x43\157\165\156\x73\x65\154\x69\x6e\x67\40\x69\x73\40\x6e\x6f\x74\40\x76\x61\154\151\x64"], 403); S60Gr: $params = $request->all(); goto IMOQ6; IMOQ6: $BzV1q->update(["\164\x69\164\x6c\x65" => $params["\x74\151\x74\154\x65"], "\163\154\165\x67" => Helper::slug($params["\164\151\x74\154\145"]), "\x64\x65\x73\x63\x72\x69\x70\x74\151\x6f\x6e" => $params["\x64\145\x73\x63\162\x69\160\x74\151\x6f\156"], "\x63\157\x6e\x74\145\x6e\164" => $params["\143\x6f\x6e\164\x65\156\164"], "\x74\150\165\x6d\142\x6e\141\151\x6c" => $params["\164\150\165\x6d\142\x6e\x61\x69\154"], "\x6e\x6f\x74\145" => $params["\x6e\x6f\x74\x65"], "\151\163\137\141\143\x74\x69\166\141\x74\x65\x64" => $params["\x69\163\x5f\x61\143\x74\151\x76\141\x74\145\x64"] === true ? 1 : 0, "\x75\160\x64\141\x74\145\144\x5f\x61\x74" => date("\131\55\x6d\55\144\40\110\72\x69\72\x73")]); return response()->json(null, 204); goto pzrks; MRuSR: $gQI8J = Validator::make($request->all(), ["\164\x69\164\x6c\145" => ["\162\145\x71\165\x69\162\x65\x64"], "\x64\145\x73\x63\x72\x69\x70\x74\151\x6f\x6e" => ["\162\145\x71\165\x69\162\145\x64"], "\x69\x73\x5f\141\143\164\151\x76\x61\x74\145\144" => ["\162\145\x71\x75\x69\162\x65\144"]]); if (!$gQI8J->fails()) { goto KWEBF; } return response()->json(["\x65\162\x72\x6f\x72\163" => $gQI8J->errors()], 403); goto TV3v3; TV3v3: KWEBF: $BzV1q = Counseling::notDeleted()->where("\151\x64", $NbsCI)->first(); if (isset($BzV1q)) { goto S60Gr; } goto odvku; pzrks: } public function destroy($NbsCI = 0) { $BzV1q = Counseling::notDeleted()->where("\x69\144", $NbsCI)->first(); if (isset($BzV1q)) { goto pWOs2; } response()->json(["\x65\162\162\157\162" => "\x45\150\150\150\x21\40\x43\141\156\x20\x6e\x6f\x74\x20\144\145\154\x65\164\145\40\164\x68\x69\163\40\143\157\165\x6e\163\145\x6c\x69\x6e\147"], 403); pWOs2: try { $BzV1q->update(["\151\x73\137\x64\x65\x6c\145\x74\x65\144" => true]); } catch (\Exception $Au8bm) { response()->json(["\x65\162\x72\x6f\x72" => $Au8bm->getMessage()], 403); } return response()->json(null, 204); } public function destroyMultiple(Request $request) { goto HkNMV; l79FT: KAlmN: $aEoMk = $request->get("\x69\144\x73", []); $v_lrb = Counseling::notDeleted()->whereIn("\151\144", $aEoMk)->get(); goto jEL6H; jEL6H: if (!($v_lrb->count() <= 0)) { goto gCMjw; } response()->json(["\x65\x72\162\x6f\162" => "\x43\x6f\x75\x6e\163\145\154\151\x6e\x67\40\x69\x73\40\x6e\x6f\x74\x20\x76\x61\x6c\x69\x64\x2e"], 403); gCMjw: goto KuEwC; HkNMV: $gQI8J = Validator::make($request->all(), ["\x69\x64\163" => "\162\x65\161\x75\x69\x72\x65\144"]); if (!$gQI8J->fails()) { goto KAlmN; } return response()->json(["\x65\x72\x72\157\162\x73" => $gQI8J->errors()], 403); goto l79FT; KuEwC: try { Counseling::notDeleted()->whereIn("\x69\144", $aEoMk)->update(["\x69\x73\137\144\x65\154\x65\x74\145\144" => true]); } catch (\Exception $Au8bm) { response()->json(["\145\162\162\157\162" => $Au8bm->getMessage()], 403); } return response()->json(null, 204); goto K_ndF; K_ndF: } public function activateMultiple(Request $request) { goto iF3zm; vunY9: try { Counseling::notDeleted()->whereIn("\x69\144", $aEoMk)->update(["\x69\163\137\141\143\x74\151\166\141\164\x65\144" => true]); } catch (\Exception $Au8bm) { response()->json(["\145\162\162\157\162" => $Au8bm->getMessage()], 403); } return response()->json(null, 204); goto NrdG0; XXfaM: xHjiL: $aEoMk = $request->get("\151\x64\x73", []); $v_lrb = Counseling::notDeleted()->whereIn("\x69\144", $aEoMk)->get(); goto TOgNe; iF3zm: $gQI8J = Validator::make($request->all(), ["\x69\x64\x73" => "\162\x65\161\x75\x69\162\145\144"]); if (!$gQI8J->fails()) { goto xHjiL; } return response()->json(["\x65\162\x72\x6f\162\163" => $gQI8J->errors()], 403); goto XXfaM; TOgNe: if (!($v_lrb->count() <= 0)) { goto mxsFu; } response()->json(["\145\x72\162\157\162" => "\x43\157\x75\156\163\145\x6c\x69\156\x67\40\151\x73\x20\156\157\x74\x20\x76\141\154\151\x64\56"], 403); mxsFu: goto vunY9; NrdG0: } public function deactivateMultiple(Request $request) { goto E9frK; XLYt9: try { Counseling::notDeleted()->whereIn("\151\144", $aEoMk)->update(["\x69\163\137\141\x63\164\151\x76\x61\164\145\144" => false]); } catch (\Exception $Au8bm) { response()->json(["\x65\162\x72\x6f\162" => $Au8bm->getMessage()], 403); } return response()->json(null, 204); goto C04_d; YWyq7: if (!($v_lrb->count() <= 0)) { goto FiLRy; } response()->json(["\x65\162\162\157\162" => "\103\157\165\156\x73\145\154\151\x6e\147\x20\x69\x73\x20\x6e\157\164\x20\x76\141\x6c\151\144\x2e"], 403); FiLRy: goto XLYt9; E9frK: $gQI8J = Validator::make($request->all(), ["\151\x64\x73" => "\162\145\x71\x75\x69\x72\145\144"]); if (!$gQI8J->fails()) { goto vMDX6; } return response()->json(["\145\x72\x72\157\x72\x73" => $gQI8J->errors()], 403); goto LkuGv; LkuGv: vMDX6: $aEoMk = $request->get("\151\x64\163", []); $v_lrb = Counseling::notDeleted()->whereIn("\x69\144", $aEoMk)->get(); goto YWyq7; C04_d: } public function uploadImage(Request $request) { goto B38v6; aVwHq: return response()->json(["\163\164\141\164\165\x73" => "\163\165\x63\143\x65\163\163", "\155\145\163\x73\x61\147\x65" => "\125\160\x6c\x6f\x61\144\40\123\165\143\x63\x65\x73\163\x2e", "\146\x69\x6c\x65\x5f\x6e\x61\x6d\x65" => $eMlSi, "\142\x61\x73\x65\116\141\155\x65" => $Anc7U], 200); OD7yd: return response()->json(["\x73\164\x61\x74\165\x73" => "\145\162\x72\x6f\162", "\155\145\x73\163\141\x67\145" => "\x55\160\154\157\x61\x64\40\x46\x61\x69\x6c\56", "\146\151\x6c\x65\137\156\141\155\145" => null], 403); goto uzivX; B38v6: if (!$request->hasFile("\x69\155\x61\147\x65")) { goto OD7yd; } $Mk9dH = $request->file("\151\155\141\x67\x65"); $Anc7U = $Mk9dH->getClientOriginalName(); goto sf4D2; sf4D2: $eMlSi = md5($Anc7U . rand(1111, 9999) . date("\131\x6d\144\110\151\x73")) . "\56" . $Mk9dH->getClientOriginalExtension(); $Mk9dH->move($this->_pathTemp, $eMlSi); chmod($this->_pathTemp . $eMlSi, 0777); goto aVwHq; uzivX: } public function uploadImages(Request $request) { goto EC0TF; ynV_2: return response()->json(["\150\x61\x73\123\x75\143\143\145\x73\163" => true, "\155\145\163\x73\141\147\x65" => "\x55\x70\x6c\x6f\141\x64\40\123\x75\143\x63\x65\163\163\56", "\x66\x69\x6c\x65\x5f\156\x61\x6d\x65" => $eMlSi, "\142\141\x73\145\116\x61\155\x65" => $Anc7U, "\146\151\x6c\145\x73" => ["\x66\151\x6c\x65" => $eMlSi]], 200); vR1mE: return response()->json(["\150\x61\x73\123\x75\143\143\x65\163\x73" => false, "\x6d\145\x73\163\x61\147\145" => "\x55\160\x6c\x6f\x61\144\40\x46\141\x69\x6c\x2e", "\x66\x69\x6c\145\x5f\x6e\141\x6d\x65" => null, "\146\x69\154\x65\x73" => null], 403); goto YaqTA; peBTV: $eMlSi = md5($Anc7U . rand(1111, 9999) . date("\x59\155\x64\110\151\x73")) . "\x2e" . $Mk9dH->getClientOriginalExtension(); $Mk9dH->move($this->_pathFile, $eMlSi); chmod($this->_pathFile . $eMlSi, 0777); goto ynV_2; EC0TF: if (!$request->hasFile("\x66\x69\x6c\x65")) { goto vR1mE; } $Mk9dH = $request->file("\x66\151\x6c\x65"); $Anc7U = $Mk9dH->getClientOriginalName(); goto peBTV; YaqTA: } }