<?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 App\Topic; use Illuminate\Http\Request; use Illuminate\Support\Arr; use App\Language; use App\Http\Resources\Admin\LanguageResource; use Validator; class LanguageController extends Controller { const ITEM_PER_PAGE = 100; public function index(Request $request) { goto wS4L9; wS4L9: $GT1Pa = $request->all(); $FPXZq = Language::select("\52"); $Wa9xn = Arr::get($GT1Pa, "\154\151\x6d\151\x74", static::ITEM_PER_PAGE); goto EiP9C; bIDoO: l9cyr: $FPXZq->orderBy("\153\145\171"); return LanguageResource::collection($FPXZq->paginate($Wa9xn)); goto KFZt4; EiP9C: $xUNTQ = Arr::get($GT1Pa, "\153\145\171\167\x6f\x72\144", ''); if (empty($xUNTQ)) { goto l9cyr; } $FPXZq->where(function ($A1TYr) use($xUNTQ) { $A1TYr->where("\x6b\145\x79", "\114\x49\x4b\105", "\45" . $xUNTQ . "\45")->orWhere("\x65\x6e", "\x4c\x49\x4b\105", "\45" . $xUNTQ . "\45")->orWhere("\152\141", "\114\111\113\x45", "\x25" . $xUNTQ . "\x25")->orWhere("\x76\151", "\x4c\111\113\x45", "\45" . $xUNTQ . "\45"); }); goto bIDoO; KFZt4: } public function show($oCAhw = 0) { $J2W40 = Language::where("\x69\x64", $oCAhw)->first(); if (isset($J2W40)) { goto RJFmq; } return response()->json(["\x65\162\162\x6f\x72\163" => "\114\141\156\147\x75\141\147\x65\40\151\x73\x20\156\157\164\40\x76\141\x6c\151\144"], 403); RJFmq: return new LanguageResource($J2W40); } public function store(Request $request) { goto OgXH1; IwEwf: return new LanguageResource($J2W40); goto TO5oC; OgXH1: $uh452 = Validator::make($request->all(), ["\x6b\x65\171" => ["\x72\145\x71\x75\151\x72\145\144"]]); if (!$uh452->fails()) { goto cbP0R; } return response()->json(["\x65\162\x72\157\x72\x73" => $uh452->errors()], 403); goto h20vF; h20vF: cbP0R: $params = $request->all(); $J2W40 = Language::create(["\x6b\x65\x79" => $params["\153\x65\171"], "\x65\156" => $params["\145\x6e"], "\152\x61" => $params["\x6a\x61"], "\166\151" => $params["\166\x69"], "\x63\162\x65\x61\x74\x65\144\137\141\164" => date("\131\55\155\55\144\x20\110\x3a\151\72\x73"), "\165\160\144\141\x74\145\x64\x5f\141\164" => date("\131\x2d\x6d\x2d\x64\40\110\72\151\72\x73")]); goto IwEwf; TO5oC: } public function update($oCAhw = 0, Request $request) { goto M1qEN; KoRna: return response()->json(["\145\162\x72\157\162\x73" => "\x4c\141\156\x67\165\141\x67\x65\x20\151\x73\40\x6e\157\164\40\x76\141\x6c\151\x64"], 403); kJ6yz: $params = $request->all(); goto F12rB; F12rB: $J2W40->update(["\x6b\x65\171" => $params["\153\x65\171"], "\145\x6e" => $params["\x65\x6e"], "\152\x61" => $params["\x6a\141"], "\166\x69" => $params["\166\151"], "\x75\160\x64\x61\x74\145\144\137\141\164" => date("\131\55\155\55\144\x20\x48\72\151\x3a\x73")]); return response()->json(null, 204); goto fiD95; NSGT9: DvGnQ: $J2W40 = Language::where("\x69\x64", $oCAhw)->first(); if (isset($J2W40)) { goto kJ6yz; } goto KoRna; M1qEN: $uh452 = Validator::make($request->all(), ["\x6b\x65\171" => ["\x72\145\161\165\151\162\x65\x64"]]); if (!$uh452->fails()) { goto DvGnQ; } return response()->json(["\x65\162\x72\157\x72\x73" => $uh452->errors()], 403); goto NSGT9; fiD95: } public function destroy($oCAhw = 0) { $J2W40 = Language::where("\151\144", $oCAhw)->first(); if (isset($J2W40)) { goto EY6S7; } response()->json(["\145\x72\162\x6f\162" => "\x45\150\150\150\x21\40\103\141\156\x20\x6e\x6f\164\x20\x64\x65\x6c\x65\164\x65\x20\x74\x68\151\x73\40\154\141\x6e\147\x75\x61\x67\145"], 403); EY6S7: $J2W40->delete(); return response()->json(null, 204); } public function destroyMultiple(Request $request) { goto sz_e3; oMNCW: if (!($YXB89->count() <= 0)) { goto fd7Gc; } response()->json(["\x65\x72\x72\157\162" => "\114\x61\156\x67\x75\141\x67\145\40\x69\163\x20\x6e\x6f\164\x20\x76\141\154\x69\144\56"], 403); fd7Gc: goto DyYyQ; DyYyQ: try { Language::whereIn("\151\144", $Z9gm0)->delete(); } catch (\Exception $kdUIx) { response()->json(["\145\x72\x72\157\x72" => $kdUIx->getMessage()], 403); } return response()->json(null, 204); goto U3ngF; ro71G: O3ccJ: $Z9gm0 = $request->get("\151\144\163", []); $YXB89 = Language::whereIn("\151\x64", $Z9gm0)->get(); goto oMNCW; sz_e3: $uh452 = Validator::make($request->all(), ["\x69\144\163" => "\x72\145\x71\x75\x69\x72\145\144"]); if (!$uh452->fails()) { goto O3ccJ; } return response()->json(["\145\162\x72\157\x72\x73" => $uh452->errors()], 403); goto ro71G; U3ngF: } }