<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:02:01
 namespace App\Http\Controllers; use App\CategoryManufacturer; use Illuminate\Http\Request; use Illuminate\Support\Arr; use App\Http\Resources\CategoryDetailResource; use App\Http\Resources\CategoryResource; use App\Category; class CategoryController extends Controller { const ITEM_PER_PAGE = 25; public function index(Request $request) { goto GcKaz; fIMWk: return CategoryResource::collection($RwtN_->paginate($XssVp)); goto YTZH7; zNNWj: $RwtN_->where("\156\141\x6d\x65", "\114\111\113\x45", "\45" . $GUsN5 . "\45"); mmlWW: if (!($brLTU != '')) { goto CHLKk; } goto M5Y3V; Ymaqt: $brLTU = Arr::get($EDi3S, "\x73\x74\x61\164\165\x73", ''); $RwtN_ = Category::select("\x69\x64", "\156\141\155\x65", "\x73\x6c\x75\x67", "\x73\x75\x62\x5f\164\x69\164\154\145", "\147\162\x6f\x75\160", "\x69\x6d\x61\x67\x65", "\144\x65\163\x63\162\x69\x70\164\x69\157\x6e", "\160\x61\162\x65\x6e\x74\x5f\x69\x64")->isPublished(); if (empty($GUsN5)) { goto mmlWW; } goto zNNWj; M5Y3V: $RwtN_->where("\x69\163\137\x61\x63\164\x69\x76\x61\x74\145\144", $brLTU); CHLKk: $RwtN_->orderBy("\x6e\x61\x6d\145", "\101\123\x43"); goto fIMWk; GcKaz: $EDi3S = $request->all(); $XssVp = Arr::get($EDi3S, "\x6c\151\x6d\151\164", static::ITEM_PER_PAGE); $GUsN5 = Arr::get($EDi3S, "\153\x65\x79\x77\157\162\144", ''); goto Ymaqt; YTZH7: } public function top(Request $request) { $EDi3S = $request->all(); $XssVp = Arr::get($EDi3S, "\154\151\x6d\x69\x74", static::ITEM_PER_PAGE); $RwtN_ = Category::select("\151\x64", "\156\141\155\x65", "\x73\154\x75\x67", "\163\165\142\137\x74\151\x74\154\x65", "\x67\162\157\165\x70", "\x69\x6d\141\147\145", "\x64\145\163\143\162\151\160\x74\151\157\x6e")->isPublished()->where("\160\141\162\145\x6e\x74\137\x69\144", 0)->orderBy("\156\x61\x6d\145", "\101\x53\x43"); return CategoryResource::collection($RwtN_->paginate($XssVp)); } public function slug($IwlHH = '') { $EX3cx = Category::select("\151\x64", "\x6e\x61\155\x65", "\163\x6c\x75\x67", "\x73\x75\142\137\x74\151\164\x6c\x65", "\147\x72\157\165\x70", "\151\x6d\x61\x67\145", "\x64\x65\163\143\162\x69\x70\x74\x69\157\156", "\x64\145\163\x63\162\151\x70\x74\151\157\x6e")->isPublished()->where("\x73\154\x75\147", $IwlHH)->first(); return new CategoryResource($EX3cx); } public function show($rh1yi = '') { $EX3cx = Category::select("\151\144", "\x6e\x61\x6d\x65", "\163\154\x75\147", "\x73\165\142\x5f\x74\151\164\x6c\x65", "\147\162\x6f\165\160", "\x69\155\x61\147\x65", "\x64\x65\163\x63\162\x69\x70\x74\x69\x6f\156", "\144\x65\163\x63\x72\151\x70\164\x69\157\156")->isPublished()->where("\151\x64", $rh1yi)->first(); return new CategoryDetailResource($EX3cx); } public function manufacturer($rh1yi) { $INWeN = CategoryManufacturer::where("\155\141\x6e\165\146\x61\143\164\165\x72\145\162\137\x69\144", $rh1yi)->pluck("\143\141\x74\x65\147\x6f\162\171\x5f\x69\x64")->toArray(); $RwtN_ = Category::select("\52")->isPublished()->whereIn("\151\144", $INWeN)->where("\x70\x61\162\145\156\164\137\151\144", 0)->orderBy("\156\x61\155\x65", "\x41\x53\x43")->get(); return CategoryDetailResource::collection($RwtN_); } public function onlyParent(Request $request) { $EDi3S = $request->all(); $XssVp = Arr::get($EDi3S, "\x6c\x69\x6d\151\164", static::ITEM_PER_PAGE); $RwtN_ = Category::select("\x69\x64", "\156\x61\x6d\x65", "\x73\154\165\x67", "\163\165\x62\x5f\164\151\x74\x6c\145", "\x67\x72\x6f\x75\160", "\x69\x6d\x61\x67\145", "\x64\x65\x73\x63\162\151\160\164\151\157\156", "\x70\141\x72\x65\x6e\x74\137\x69\x64")->isPublished()->where("\160\141\x72\145\x6e\x74\137\x69\x64", 0)->orderBy("\156\x61\155\145", "\x41\x53\x43"); return CategoryResource::collection($RwtN_->paginate($XssVp)); } public function onlyChildren(Request $request) { $EDi3S = $request->all(); $XssVp = Arr::get($EDi3S, "\154\151\155\151\164", static::ITEM_PER_PAGE); $FyXMr = Arr::get($EDi3S, "\x70\x61\x72\145\156\164\x49\144", ''); $RwtN_ = Category::select("\151\x64", "\156\141\x6d\145", "\163\x6c\x75\147", "\x73\165\x62\x5f\x74\x69\x74\154\x65", "\147\162\157\x75\x70", "\x69\x6d\141\x67\145", "\x64\x65\x73\143\162\151\x70\x74\151\157\156", "\160\141\x72\x65\x6e\x74\137\151\x64")->isPublished()->whereNotNull("\x70\x61\x72\145\156\164\137\151\144")->where("\x70\x61\x72\145\156\164\x5f\x69\x64", "\x21\75", 0)->where("\x70\x61\x72\145\156\164\137\151\x64", $FyXMr)->orderBy("\x6e\141\155\x65", "\101\123\103"); return CategoryResource::collection($RwtN_->paginate($XssVp)); } }