<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:01:59
 namespace App\Http\Controllers\Admin; use App\TransitionPoint; use App\Http\Controllers\Controller; use App\Http\Resources\Admin\TransitionPointResource; use Illuminate\Http\Request; use Illuminate\Support\Arr; use Validator; class TransitionPointController extends Controller { const ITEM_PER_PAGE = 100; public function index(Request $request) { goto Xb46e; N1cj9: return TransitionPointResource::collection($L4iQK->paginate($dG98b)); goto q4qv9; FMOaF: $L4iQK->where("\145\x6d\x70\154\x6f\x79\x65\x65\137\151\144", $DUMXk); qz89f: $L4iQK->orderBy("\151\x64"); goto N1cj9; Xb46e: $RIG0h = $request->all(); $L4iQK = TransitionPoint::query(); $dG98b = Arr::get($RIG0h, "\154\x69\155\151\x74", static::ITEM_PER_PAGE); goto I6ET2; qX1IQ: $L4iQK->whereHas("\145\x6d\160\154\x6f\171\145\x65", function ($h8xLB) use($pvrry) { $h8xLB->where("\145\x6d\x70\154\157\171\145\145\137\x63\x6f\144\145", "\114\x49\x4b\x45", "\x25" . $pvrry . "\x25"); }); mRw7c: if (empty($DUMXk)) { goto qz89f; } goto FMOaF; I6ET2: $pvrry = Arr::get($RIG0h, "\153\145\171\x77\x6f\162\x64", ''); $DUMXk = Arr::get($RIG0h, "\x65\155\160\154\x6f\x79\145\145\137\151\144", ''); if (empty($pvrry)) { goto mRw7c; } goto qX1IQ; q4qv9: } public function all() { return TransitionPointResource::collection(TransitionPoint::with(["\x65\155\x70\x6c\157\171\145\145"])->orderBy("\x69\x64", "\144\x65\x73\143")->get()); } public function show($BJ00U = 0) { $BOknr = TransitionPoint::with(["\145\x6d\160\154\x6f\171\x65\x65"])->findOrFail($BJ00U); return new TransitionPointResource($BOknr); } public function store(Request $request) { goto cMwB3; D0lvM: og6ml: $params = $request->all(); $ZdhSN = TransitionPoint::where("\x65\x6d\160\154\157\x79\145\145\x5f\x69\x64", $params["\145\155\160\x6c\x6f\171\x65\x65\x5f\151\x64"])->count(); goto CqFHV; CqFHV: if (!($ZdhSN > 0)) { goto qjITR; } return response()->json(["\x65\x72\x72\x6f\162\x73" => "\x54\x68\145\40\164\x72\x61\x6e\163\151\164\151\x6f\x6e\x20\x70\157\x69\156\x74\x20\x61\x6c\x72\x65\x61\144\x79\x20\x65\170\x69\x73\164\x73"], 403); qjITR: goto JLIRl; cMwB3: $FEIue = Validator::make($request->all(), ["\x65\x6d\160\x6c\157\171\x65\145\137\x69\144" => ["\162\x65\161\x75\x69\x72\145\144", "\x65\170\x69\x73\x74\x73\x3a\145\155\160\x6c\157\x79\145\x65\x73\54\x69\x64", "\165\156\151\161\165\x65\x3a\164\x72\x61\156\163\x69\x74\151\157\156\137\160\157\151\156\x74\x73\54\145\155\x70\x6c\157\171\145\145\137\151\x64"], "\x74\x65\x6e\x75\162\x65\x5f\x70\157\151\156\164\163" => ["\162\145\x71\x75\x69\162\x65\x64", "\156\165\x6d\x65\x72\x69\143", "\155\151\x6e\72\60"], "\160\157\163\151\x74\151\x6f\156\x5f\x70\157\151\x6e\x74\163" => ["\162\145\161\x75\x69\162\x65\x64", "\x6e\x75\155\145\x72\151\143", "\x6d\151\156\x3a\60"], "\145\144\x75\143\x61\x74\151\x6f\x6e\137\160\x6f\x69\x6e\164\x73" => ["\162\x65\161\x75\151\x72\x65\144", "\156\x75\x6d\145\x72\151\143", "\x6d\151\x6e\x3a\60"], "\x6e\x6f\164\x65" => ["\156\165\154\x6c\x61\x62\154\x65", "\163\x74\162\x69\x6e\x67"]]); if (!$FEIue->fails()) { goto og6ml; } return response()->json(["\145\162\162\x6f\x72\x73" => $FEIue->errors()], 403); goto D0lvM; JLIRl: $BOknr = TransitionPoint::create(["\145\155\x70\x6c\x6f\x79\x65\x65\137\151\144" => $params["\145\x6d\160\x6c\x6f\171\145\x65\137\151\x64"], "\164\145\156\x75\162\x65\137\160\157\151\156\x74\163" => $params["\164\145\156\165\x72\145\137\160\157\x69\156\164\x73"], "\x70\157\x73\151\x74\x69\157\x6e\x5f\x70\x6f\151\156\164\x73" => $params["\160\157\163\x69\164\151\157\x6e\x5f\160\157\x69\156\x74\163"], "\x65\x64\165\143\x61\164\x69\157\156\137\x70\x6f\x69\x6e\x74\x73" => $params["\x65\x64\x75\143\x61\x74\x69\x6f\156\x5f\160\x6f\x69\156\x74\x73"], "\x6e\x6f\164\x65" => $params["\156\x6f\164\x65"] ?? null, "\x63\162\x65\141\164\x65\144\x5f\x62\171" => auth("\x61\x70\151")->id()]); return new TransitionPointResource($BOknr); goto csMYt; csMYt: } public function update(Request $request, $BJ00U = 0) { goto ZYOF2; qp0BW: dmp59: $BOknr->update(["\x65\x6d\x70\x6c\x6f\x79\145\145\137\x69\144" => $params["\x65\x6d\x70\154\x6f\171\x65\x65\x5f\x69\144"], "\164\x65\156\165\x72\145\137\160\x6f\x69\156\164\163" => $params["\164\145\156\165\x72\x65\x5f\160\x6f\151\156\164\163"], "\160\x6f\163\x69\164\151\x6f\156\137\160\157\x69\156\164\x73" => $params["\160\x6f\x73\x69\x74\x69\x6f\156\x5f\x70\x6f\151\156\x74\x73"], "\x65\144\165\143\x61\164\151\157\156\x5f\160\x6f\x69\x6e\x74\x73" => $params["\x65\x64\x75\143\141\x74\151\x6f\x6e\137\160\157\151\156\164\x73"], "\156\x6f\164\145" => $params["\156\157\x74\x65"] ?? null]); return response()->json(null, 204); goto cANap; ZYOF2: $FEIue = Validator::make($request->all(), ["\x65\x6d\x70\154\x6f\171\x65\x65\x5f\x69\144" => ["\x72\145\161\x75\x69\x72\145\144", "\x65\x78\151\x73\164\163\72\145\x6d\160\x6c\x6f\171\145\x65\163\54\151\x64", "\x75\x6e\151\x71\165\145\x3a\164\x72\141\x6e\x73\x69\164\151\157\156\x5f\x70\x6f\x69\156\x74\x73\x2c\x65\x6d\160\154\157\x79\x65\145\x5f\x69\144\54" . $BJ00U], "\x70\157\x69\x6e\164\163" => ["\x72\x65\161\165\x69\162\x65\144", "\x6e\x75\x6d\x65\162\151\143", "\x6d\151\x6e\72\x30"], "\x6e\x6f\164\x65" => ["\x6e\x75\154\x6c\x61\142\154\x65", "\x73\x74\162\151\x6e\147"]]); if (!$FEIue->fails()) { goto caXZv; } return response()->json(["\145\x72\162\157\x72\163" => $FEIue->errors()], 403); goto V7vdu; V7vdu: caXZv: $BOknr = TransitionPoint::findOrFail($BJ00U); $params = $request->all(); goto IStoK; IStoK: $ZdhSN = TransitionPoint::where("\145\155\x70\x6c\x6f\171\x65\x65\x5f\151\x64", $params["\x65\x6d\x70\x6c\157\x79\x65\x65\137\x69\144"])->where("\x69\144", "\x21\75", $BJ00U)->count(); if (!($ZdhSN > 0)) { goto dmp59; } return response()->json(["\x65\x72\x72\157\162\163" => "\x54\150\x65\x20\164\162\141\x6e\163\x69\164\x69\157\x6e\x20\160\x6f\151\156\164\x20\141\x6c\162\x65\141\x64\x79\x20\x65\170\151\x73\x74\163"], 403); goto qp0BW; cANap: } public function destroy($BJ00U = 0) { $BOknr = TransitionPoint::findOrFail($BJ00U); $BOknr->delete(); return response()->json(null, 204); } }