<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:01:52
 namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Support\Arr; use App\Contact; use App\Http\Resources\Admin\ContactResource; use Validator; class ContactController extends Controller { const ITEM_PER_PAGE = 20; public function index(Request $request) { goto czPz9; wYsJl: $VkAxp->where("\156\141\x6d\145", "\114\x49\113\x45", "\x25" . $BhqUg . "\x25")->orWhere("\x69\x64", $BhqUg); eBMtk: if (!($nucFs != '')) { goto Rtd0Y; } goto Q9Ejz; wB_7z: $BhqUg = Arr::get($O7HPC, "\153\145\x79\167\157\162\144", ''); $nucFs = Arr::get($O7HPC, "\163\x74\141\x74\165\163", ''); if (empty($BhqUg)) { goto eBMtk; } goto wYsJl; j8vGl: return ContactResource::collection($VkAxp->paginate($qX6Wv)); goto SIPG0; Q9Ejz: $VkAxp->where("\151\x73\137\x72\145\141\x64", $nucFs); Rtd0Y: $VkAxp->orderBy("\151\x64", "\104\x45\x53\103")->orderBy("\151\163\x5f\x72\145\141\x64"); goto j8vGl; czPz9: $O7HPC = $request->all(); $VkAxp = Contact::notDeleted(); $qX6Wv = Arr::get($O7HPC, "\x6c\151\155\x69\164", static::ITEM_PER_PAGE); goto wB_7z; SIPG0: } public function all() { $VkAxp = Contact::select("\151\144", "\156\x61\155\145", "\163\x6c\165\147")->where("\151\x73\x5f\x64\x65\154\145\x74\x65\x64", false)->orderBy("\x69\x64"); return ContactResource::collection($VkAxp->get()); } public function show($tW3AT = 0) { $XfeCq = Contact::where("\x69\x73\x5f\x64\145\x6c\145\164\x65\144", false)->where("\151\144", $tW3AT)->first(); if (isset($XfeCq)) { goto juov2; } return response()->json(["\x65\x72\x72\x6f\162\x73" => "\x43\x6f\x6e\x74\141\x63\164\40\151\x73\x20\x6e\x6f\164\40\166\141\x6c\x69\x64"], 403); juov2: return new ContactResource($XfeCq); } public function read($tW3AT = 0) { $XfeCq = Contact::where("\151\x73\137\x64\x65\x6c\145\x74\x65\144", false)->where("\151\x64", $tW3AT)->first(); if (isset($XfeCq)) { goto JKtLo; } return response()->json(["\x65\162\162\157\x72\x73" => "\x43\x6f\x6e\x74\141\x63\x74\40\x69\163\40\156\x6f\x74\x20\x76\141\154\x69\x64"], 403); JKtLo: $XfeCq->update(["\x69\163\x5f\162\145\141\144" => true]); return response()->json(null, 204); } public function store(Request $request) { goto Y04bW; jMoU5: return new ContactResource($XfeCq); goto Oplza; Y04bW: $rFXf8 = Validator::make($request->all(), ["\156\141\x6d\145" => ["\x72\x65\161\165\151\x72\x65\x64"], "\x69\163\x5f\162\x65\x61\x64" => ["\162\x65\161\165\151\162\x65\144"]]); if (!$rFXf8->fails()) { goto YX643; } return response()->json(["\x65\162\x72\157\162\x73" => $rFXf8->errors()], 403); goto TW1xx; TW1xx: YX643: $params = $request->all(); $XfeCq = Contact::create(["\156\141\x6d\x65" => $params["\156\x61\155\145"], "\163\x6c\x75\147" => $params["\x6e\x61\x6d\145"], "\144\145\x73\143\162\151\160\x74\151\x6f\156" => $params["\x64\145\x73\143\162\x69\x70\164\x69\x6f\x6e"], "\x69\x73\137\x72\x65\141\144" => $params["\x69\x73\137\x72\145\x61\x64"] === true ? 1 : 0, "\x63\162\x65\x61\164\145\144\x5f\141\x74" => date("\x59\x2d\x6d\55\x64\x20\110\72\151\x3a\163"), "\x75\160\144\x61\164\145\x64\137\141\x74" => date("\x59\55\155\55\144\x20\x48\x3a\x69\72\x73")]); goto jMoU5; Oplza: } public function update($tW3AT = 0, Request $request) { goto TdDVP; YF4TC: return response()->json(["\145\x72\162\x6f\162\163" => "\x43\157\x6e\x74\141\x63\164\40\x69\x73\x20\156\x6f\164\40\x76\141\x6c\x69\x64"], 403); YxX_K: $params = $request->all(); goto vunxd; TdDVP: $rFXf8 = Validator::make($request->all(), ["\156\x61\155\x65" => ["\162\145\x71\x75\151\x72\145\144"], "\x69\x73\137\x72\145\x61\144" => ["\x72\145\x71\x75\x69\162\x65\x64"]]); if (!$rFXf8->fails()) { goto YgGsR; } return response()->json(["\x65\162\x72\157\162\x73" => $rFXf8->errors()], 403); goto W2LNn; vunxd: $XfeCq->update(["\x6e\x61\155\x65" => $params["\156\141\155\x65"], "\x73\x6c\165\147" => $params["\x6e\141\x6d\145"], "\144\x65\163\143\x72\151\x70\164\x69\157\156" => $params["\144\x65\x73\143\x72\151\160\164\x69\x6f\x6e"], "\151\163\137\x72\x65\x61\x64" => $params["\x69\163\x5f\162\145\x61\144"] === true ? 1 : 0, "\165\160\x64\x61\164\145\144\x5f\141\x74" => date("\x59\55\155\55\x64\40\x48\x3a\x69\x3a\163")]); return response()->json(null, 204); goto VJLjV; W2LNn: YgGsR: $XfeCq = Contact::notDeleted()->where("\x69\x64", $tW3AT)->first(); if (isset($XfeCq)) { goto YxX_K; } goto YF4TC; VJLjV: } public function destroy($tW3AT = 0) { $XfeCq = Contact::notDeleted()->where("\x69\x64", $tW3AT)->first(); if (isset($XfeCq)) { goto SPu9u; } response()->json(["\x65\162\162\x6f\x72" => "\x45\150\150\150\41\x20\103\141\x6e\x20\156\x6f\x74\x20\144\145\x6c\145\x74\x65\40\164\150\151\163\40\143\141\x74\x65\147\x6f\162\x79"], 403); SPu9u: try { $XfeCq->update(["\151\163\x5f\x64\145\154\145\x74\145\144" => true]); } catch (\Exception $KC005) { response()->json(["\x65\x72\162\157\162" => $KC005->getMessage()], 403); } return response()->json(null, 204); } public function destroyMultiple(Request $request) { goto X6AmI; X6AmI: $rFXf8 = Validator::make($request->all(), ["\x69\144\163" => "\162\145\161\x75\151\162\145\x64"]); if (!$rFXf8->fails()) { goto ZuhJf; } return response()->json(["\145\x72\162\x6f\162\x73" => $rFXf8->errors()], 403); goto y5WLK; v4cdB: try { Contact::notDeleted()->whereIn("\x69\x64", $tDPBt)->update(["\x69\x73\137\144\x65\154\145\x74\145\x64" => true]); } catch (\Exception $KC005) { response()->json(["\145\162\x72\157\162" => $KC005->getMessage()], 403); } return response()->json(null, 204); goto KHu5h; gPeM1: if (!($z3rYR->count() <= 0)) { goto nbzDM; } response()->json(["\x65\x72\162\x6f\162" => "\x43\157\156\164\141\x63\x74\40\151\163\x20\x6e\x6f\164\40\x76\x61\x6c\x69\144\x2e"], 403); nbzDM: goto v4cdB; y5WLK: ZuhJf: $tDPBt = $request->get("\151\144\163", []); $z3rYR = Contact::notDeleted()->whereIn("\151\144", $tDPBt)->get(); goto gPeM1; KHu5h: } public function activateMultiple(Request $request) { goto P4HEQ; CqI32: if (!($z3rYR->count() <= 0)) { goto EzEfq; } response()->json(["\145\x72\162\157\x72" => "\x43\157\156\x74\141\x63\x74\x20\x69\163\40\x6e\157\x74\x20\x76\141\x6c\151\144\56"], 403); EzEfq: goto cbK5O; cbK5O: try { Contact::notDeleted()->whereIn("\x69\144", $tDPBt)->update(["\151\x73\x5f\x72\x65\x61\x64" => true]); } catch (\Exception $KC005) { response()->json(["\145\x72\x72\x6f\162" => $KC005->getMessage()], 403); } return response()->json(null, 204); goto dShtZ; P4HEQ: $rFXf8 = Validator::make($request->all(), ["\x69\144\x73" => "\x72\x65\x71\165\x69\162\x65\x64"]); if (!$rFXf8->fails()) { goto MFB18; } return response()->json(["\145\162\x72\157\162\163" => $rFXf8->errors()], 403); goto qq05O; qq05O: MFB18: $tDPBt = $request->get("\x69\144\163", []); $z3rYR = Contact::notDeleted()->whereIn("\151\x64", $tDPBt)->get(); goto CqI32; dShtZ: } public function deactivateMultiple(Request $request) { goto fe1FR; fe1FR: $rFXf8 = Validator::make($request->all(), ["\x69\x64\x73" => "\162\x65\x71\x75\x69\162\145\144"]); if (!$rFXf8->fails()) { goto XXHpo; } return response()->json(["\x65\162\x72\x6f\x72\x73" => $rFXf8->errors()], 403); goto MpCg6; UbseM: try { Contact::notDeleted()->whereIn("\151\144", $tDPBt)->update(["\x69\163\137\162\145\141\144" => false]); } catch (\Exception $KC005) { response()->json(["\x65\x72\162\x6f\162" => $KC005->getMessage()], 403); } return response()->json(null, 204); goto T9T4G; MpCg6: XXHpo: $tDPBt = $request->get("\x69\x64\163", []); $z3rYR = Contact::notDeleted()->whereIn("\x69\x64", $tDPBt)->get(); goto KIRc_; KIRc_: if (!($z3rYR->count() <= 0)) { goto bc8I7; } response()->json(["\145\x72\162\x6f\162" => "\x43\x6f\x6e\164\141\x63\164\x20\x69\x73\x20\x6e\157\x74\40\x76\141\154\x69\x64\56"], 403); bc8I7: goto UbseM; T9T4G: } }