Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* ___________________________________________________ | Aura Komputer - Jas..

Decoded Output download

<?php 
/*   ___________________________________________________ 
    | Aura Komputer - Jasa Pembuatan Aplikasi Komputer | 
    |              on 2023-09-16 15:44:15             | 
    |    Contact: https://s.id/aurakomputer            | 
    |__________________________________________________| 
*/ 
 namespace HantamKoding\Helpers; use Carbon\Carbon; use HantamKoding\Models\Files; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Request as FacadesRequest; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; class SpHelper { public static function response($status, $message, $data = [], $response_code = 200) { $data = ["status" => (bool) $status, "title" => $status ? "Sukses " : "Gagal", "message" => $message, "data" => $data]; return response()->json($data, $response_code); } public static function redirect($to, $status, $message, $params = [], $route = true) { if ($route == true) { if ($to == "back") { return Redirect::back()->with("response", ["status" => $status, "message" => $message]); } return Redirect::route($to, $params)->with("response", ["status" => $status, "message" => $message]); } else { return Redirect::to($to)->with("response", ["status" => $status, "message" => $message]); } } public static function generateCurrentSchoolYear() { goto XYMoY; XYMoY: $bulan_sekarang = date("m"); goto AVVAZ; DKix1: if ($bulan_sekarang < 6) { return ceil($tahun_sekarang - 1) . "-" . ceil($tahun_sekarang); } else { return ceil($tahun_sekarang) . "-" . ceil($tahun_sekarang + 1); } goto m4sOi; AVVAZ: $tahun_sekarang = date("Y"); goto DKix1; m4sOi: } public static function generateTable($model, $columns_search = [], $hiddens = [], $appends = []) { goto YWCzl; X5HvS: $orderByName = request()->orderBy[0] ?? "created_at"; goto PDGFk; PDGFk: $orderType = request()->orderBy[1] ?? "ASC"; goto DUB6K; jiBo2: $query = $model->paginate(request()->rowsPerPage ?? 5)->appends(request()->query()); goto iG6Gz; QvzPG: $hiddens = array_merge(explode(",", request()->get("hide")), $hiddens); goto KRn8c; P_AfT: if (!empty($search) && count($columns_search) > 0) { $model->where(function ($query) use($columns_search, $search) { foreach ($columns_search as $column) { if (strpos($column, ".")) { $split_column_name = explode(".", $column); $query->joinRelationship($split_column_name[0])->orWhereHas($split_column_name[0], function ($join) use($search, $column, $split_column_name) { $join->where($split_column_name[1], "LIKE", "%{$search}%"); }); } else { $query->orWhere($column, "LIKE", "%{$search}%"); } } }); } goto X5HvS; KRn8c: $search = request()->search ?? null; goto P_AfT; KnVFU: return ["currentPage" => $query->currentPage(), "perPage" => $query->perPage(), "total" => $query->total(), "rows" => $query->items(), "hasMorePages" => $query->hasMorePages()]; goto CTIXz; iG6Gz: $query->getCollection()->transform(function ($item) use($appends, $hiddens) { goto FOLiJ; PMDAX: return $item; goto kZ7EB; bSiGf: if (isset($hiddens) && count($hiddens)) { $item->makeHidden($hiddens); } goto PMDAX; FOLiJ: if (isset($appends) && count($appends)) { $item->setAppends($appends); } goto bSiGf; kZ7EB: }); goto KnVFU; DUB6K: if (!empty($orderByName) && $orderByName != null && $orderByName != '' && $orderByName != "null" && $orderByName != "ASC" && $orderByName != "DESC") { $split_orderByName = explode(".", $orderByName); if (in_array("join", $split_orderByName)) { $model = $model->orderByPowerJoins(str_replace("join.", '', $orderByName), $orderType); } else { $model = $model->orderBy($orderByName, $orderType); } } goto jiBo2; YWCzl: $appends = array_merge(explode(",", request()->get("append")), $appends); goto QvzPG; CTIXz: } public static function numberFormater($string) { goto y61ae; WVbS0: return $newPhrase; goto meH6Q; LEImC: $replace = [Carbon::now()->format("Y"), SpHelper::getRomawi(Carbon::now()->format("m"))]; goto hfDpJ; hfDpJ: $newPhrase = str_replace($search, $replace, $string); goto WVbS0; y61ae: $search = ["[year]", "[month]"]; goto LEImC; meH6Q: } public static function getNextNumber($model, $column, $prefix) { goto JW0t8; iE6LI: $prefix_query = str_replace("[number]", '', $prefix); goto azIJd; JW0t8: $prefix = SpHelper::numberFormater($prefix); goto iE6LI; XzHoH: $last_number = str_replace($prefix_query, '', $lastItem[$column] ?? 0); goto sA8eo; fYGSj: return str_replace("[number]", $last_number, $prefix); goto UmXFB; sA8eo: $last_number = (int) $last_number + 1; goto fYGSj; azIJd: $lastItem = $model->orderBy("id", "DESC")->where(function ($query) use($prefix_query, $column) { $query->where($column, "LIKE", "%{$prefix_query}%"); })->first(); goto XzHoH; UmXFB: } public static function generatePhoneNumber($nohp) { goto l6X3z; l6X3z: $nohp = str_replace(" ", '', $nohp); goto gLofC; pk9Jm: $nohp = str_replace(")", '', $nohp); goto o4Xtx; gLofC: $nohp = str_replace("(", '', $nohp); goto pk9Jm; pVggm: if (!preg_match("/[^+0-9]/", trim($nohp))) { goto keORa; EDPk0: if (substr(trim($nohp), 0, 2) == "08") { $hp = "628" . substr(trim($nohp), 2); } goto WXEUs; lhNe0: if (substr(trim($nohp), 0, 1) == "8") { $hp = "628" . substr(trim($nohp), 1); } goto EDPk0; mNslx: if (substr(trim($nohp), 0, 3) == "+62") { $hp = "62" . substr(trim($nohp), 3); } goto lhNe0; keORa: if (substr(trim($nohp), 0, 3) == "62") { $hp = trim($nohp); } goto mNslx; WXEUs: } goto DU2_s; o4Xtx: $nohp = str_replace(".", '', $nohp); goto pVggm; DU2_s: return $hp ?? $nohp; goto I_0B6; I_0B6: } public static function getRomawi($bln) { switch ($bln) { case 1: return "I"; break; case 2: return "II"; break; case 3: return "III"; break; case 4: return "IV"; break; case 5: return "V"; break; case 6: return "VI"; break; case 7: return "VII"; break; case 8: return "VIII"; break; case 9: return "IX"; break; case 10: return "X"; break; case 11: return "XI"; break; case 12: return "XII"; break; } } public static function uploadFile($files, string $folder, $model, $type = null) { goto Kjv_V; FZ_3d: $disk = null; goto dJ7gR; dJ7gR: if (env("APP_ENV") == "local") { $disk = null; } goto YsAmk; L3kNw: return $uploaded_files; goto qNQnR; YsAmk: if ($files != null && is_array($files)) { foreach ($files as $file) { goto NpGlU; Z_Kmg: $extension = $file->extension(); goto heGoT; heGoT: $path = $file->storeAs("public/" . $target_folder, $name); goto mycGX; N1uMr: $contentType = mime_content_type($file_path); goto o59j_; QTl1r: $name = $file->hashName(); goto Z_Kmg; NpGlU: $file_path = $file->getRealPath(); goto icF8f; mycGX: if ($path) { goto BKqAm; I3fVe: $uploaded_files[] = $uploaded_file; goto SxSwg; MV55B: $uploaded_file->save(); goto I3fVe; BKqAm: $uploaded_file = Files::make(["name" => $original_name, "path" => $path, "disk" => $disk, "url" => $url ?? null, "type" => $type ?? null])->fileable()->associate($model); goto MV55B; SxSwg: } goto S_jPg; o59j_: $target_folder = $folder; goto QTl1r; icF8f: $original_name = $file->getClientOriginalName(); goto nM6uG; nM6uG: $allowedMimeTypes = ["image/jpeg", "image/png"]; goto N1uMr; S_jPg: } } goto L3kNw; Kjv_V: $uploaded_files = []; goto FZ_3d; qNQnR: } public static function getDomain() { return FacadesRequest::getHost(); } } 
 ?>

Did this file decode correctly?

Original Code

<?php
/*   ___________________________________________________
    | Aura Komputer - Jasa Pembuatan Aplikasi Komputer |
    |              on 2023-09-16 15:44:15             |
    |    Contact: https://s.id/aurakomputer            |
    |__________________________________________________|
*/
 namespace HantamKoding\Helpers; use Carbon\Carbon; use HantamKoding\Models\Files; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\Request as FacadesRequest; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; class SpHelper { public static function response($status, $message, $data = [], $response_code = 200) { $data = ["\163\x74\x61\164\x75\163" => (bool) $status, "\x74\x69\x74\154\145" => $status ? "\x53\165\x6b\x73\145\163\x20" : "\107\141\147\141\x6c", "\155\x65\x73\163\x61\x67\x65" => $message, "\x64\x61\164\x61" => $data]; return response()->json($data, $response_code); } public static function redirect($to, $status, $message, $params = [], $route = true) { if ($route == true) { if ($to == "\142\141\143\x6b") { return Redirect::back()->with("\162\x65\x73\160\157\156\x73\145", ["\163\x74\141\x74\x75\x73" => $status, "\x6d\145\x73\x73\141\147\145" => $message]); } return Redirect::route($to, $params)->with("\x72\145\x73\x70\x6f\x6e\163\145", ["\x73\x74\x61\164\165\x73" => $status, "\x6d\145\163\x73\141\x67\x65" => $message]); } else { return Redirect::to($to)->with("\162\x65\163\160\157\x6e\x73\x65", ["\163\x74\141\x74\165\x73" => $status, "\155\145\163\163\141\x67\145" => $message]); } } public static function generateCurrentSchoolYear() { goto XYMoY; XYMoY: $bulan_sekarang = date("\155"); goto AVVAZ; DKix1: if ($bulan_sekarang < 6) { return ceil($tahun_sekarang - 1) . "\x2d" . ceil($tahun_sekarang); } else { return ceil($tahun_sekarang) . "\55" . ceil($tahun_sekarang + 1); } goto m4sOi; AVVAZ: $tahun_sekarang = date("\131"); goto DKix1; m4sOi: } public static function generateTable($model, $columns_search = [], $hiddens = [], $appends = []) { goto YWCzl; X5HvS: $orderByName = request()->orderBy[0] ?? "\143\x72\x65\141\164\145\x64\x5f\141\164"; goto PDGFk; PDGFk: $orderType = request()->orderBy[1] ?? "\101\x53\x43"; goto DUB6K; jiBo2: $query = $model->paginate(request()->rowsPerPage ?? 5)->appends(request()->query()); goto iG6Gz; QvzPG: $hiddens = array_merge(explode("\54", request()->get("\150\x69\x64\x65")), $hiddens); goto KRn8c; P_AfT: if (!empty($search) && count($columns_search) > 0) { $model->where(function ($query) use($columns_search, $search) { foreach ($columns_search as $column) { if (strpos($column, "\x2e")) { $split_column_name = explode("\56", $column); $query->joinRelationship($split_column_name[0])->orWhereHas($split_column_name[0], function ($join) use($search, $column, $split_column_name) { $join->where($split_column_name[1], "\x4c\111\x4b\x45", "\x25{$search}\x25"); }); } else { $query->orWhere($column, "\x4c\x49\113\x45", "\x25{$search}\x25"); } } }); } goto X5HvS; KRn8c: $search = request()->search ?? null; goto P_AfT; KnVFU: return ["\x63\x75\162\x72\145\x6e\164\x50\x61\x67\x65" => $query->currentPage(), "\x70\145\x72\120\x61\x67\x65" => $query->perPage(), "\164\157\164\141\154" => $query->total(), "\162\x6f\x77\x73" => $query->items(), "\x68\141\x73\x4d\x6f\162\x65\x50\141\x67\x65\163" => $query->hasMorePages()]; goto CTIXz; iG6Gz: $query->getCollection()->transform(function ($item) use($appends, $hiddens) { goto FOLiJ; PMDAX: return $item; goto kZ7EB; bSiGf: if (isset($hiddens) && count($hiddens)) { $item->makeHidden($hiddens); } goto PMDAX; FOLiJ: if (isset($appends) && count($appends)) { $item->setAppends($appends); } goto bSiGf; kZ7EB: }); goto KnVFU; DUB6K: if (!empty($orderByName) && $orderByName != null && $orderByName != '' && $orderByName != "\156\x75\154\x6c" && $orderByName != "\x41\x53\x43" && $orderByName != "\x44\x45\123\x43") { $split_orderByName = explode("\x2e", $orderByName); if (in_array("\x6a\x6f\x69\x6e", $split_orderByName)) { $model = $model->orderByPowerJoins(str_replace("\152\x6f\x69\156\56", '', $orderByName), $orderType); } else { $model = $model->orderBy($orderByName, $orderType); } } goto jiBo2; YWCzl: $appends = array_merge(explode("\54", request()->get("\141\160\x70\145\x6e\144")), $appends); goto QvzPG; CTIXz: } public static function numberFormater($string) { goto y61ae; WVbS0: return $newPhrase; goto meH6Q; LEImC: $replace = [Carbon::now()->format("\131"), SpHelper::getRomawi(Carbon::now()->format("\155"))]; goto hfDpJ; hfDpJ: $newPhrase = str_replace($search, $replace, $string); goto WVbS0; y61ae: $search = ["\133\171\145\141\x72\135", "\133\155\157\156\164\x68\135"]; goto LEImC; meH6Q: } public static function getNextNumber($model, $column, $prefix) { goto JW0t8; iE6LI: $prefix_query = str_replace("\x5b\x6e\x75\x6d\142\x65\x72\135", '', $prefix); goto azIJd; JW0t8: $prefix = SpHelper::numberFormater($prefix); goto iE6LI; XzHoH: $last_number = str_replace($prefix_query, '', $lastItem[$column] ?? 0); goto sA8eo; fYGSj: return str_replace("\133\x6e\165\x6d\x62\x65\x72\135", $last_number, $prefix); goto UmXFB; sA8eo: $last_number = (int) $last_number + 1; goto fYGSj; azIJd: $lastItem = $model->orderBy("\x69\x64", "\104\105\123\103")->where(function ($query) use($prefix_query, $column) { $query->where($column, "\114\111\x4b\x45", "\x25{$prefix_query}\x25"); })->first(); goto XzHoH; UmXFB: } public static function generatePhoneNumber($nohp) { goto l6X3z; l6X3z: $nohp = str_replace("\x20", '', $nohp); goto gLofC; pk9Jm: $nohp = str_replace("\51", '', $nohp); goto o4Xtx; gLofC: $nohp = str_replace("\50", '', $nohp); goto pk9Jm; pVggm: if (!preg_match("\x2f\x5b\136\x2b\x30\55\71\x5d\x2f", trim($nohp))) { goto keORa; EDPk0: if (substr(trim($nohp), 0, 2) == "\60\x38") { $hp = "\x36\62\70" . substr(trim($nohp), 2); } goto WXEUs; lhNe0: if (substr(trim($nohp), 0, 1) == "\x38") { $hp = "\66\62\70" . substr(trim($nohp), 1); } goto EDPk0; mNslx: if (substr(trim($nohp), 0, 3) == "\53\66\x32") { $hp = "\66\x32" . substr(trim($nohp), 3); } goto lhNe0; keORa: if (substr(trim($nohp), 0, 3) == "\x36\62") { $hp = trim($nohp); } goto mNslx; WXEUs: } goto DU2_s; o4Xtx: $nohp = str_replace("\56", '', $nohp); goto pVggm; DU2_s: return $hp ?? $nohp; goto I_0B6; I_0B6: } public static function getRomawi($bln) { switch ($bln) { case 1: return "\x49"; break; case 2: return "\111\111"; break; case 3: return "\111\x49\111"; break; case 4: return "\111\x56"; break; case 5: return "\126"; break; case 6: return "\x56\111"; break; case 7: return "\126\x49\111"; break; case 8: return "\126\x49\111\x49"; break; case 9: return "\111\x58"; break; case 10: return "\x58"; break; case 11: return "\130\x49"; break; case 12: return "\x58\x49\x49"; break; } } public static function uploadFile($files, string $folder, $model, $type = null) { goto Kjv_V; FZ_3d: $disk = null; goto dJ7gR; dJ7gR: if (env("\x41\120\x50\x5f\105\116\x56") == "\154\x6f\143\141\x6c") { $disk = null; } goto YsAmk; L3kNw: return $uploaded_files; goto qNQnR; YsAmk: if ($files != null && is_array($files)) { foreach ($files as $file) { goto NpGlU; Z_Kmg: $extension = $file->extension(); goto heGoT; heGoT: $path = $file->storeAs("\x70\x75\142\154\151\143\57" . $target_folder, $name); goto mycGX; N1uMr: $contentType = mime_content_type($file_path); goto o59j_; QTl1r: $name = $file->hashName(); goto Z_Kmg; NpGlU: $file_path = $file->getRealPath(); goto icF8f; mycGX: if ($path) { goto BKqAm; I3fVe: $uploaded_files[] = $uploaded_file; goto SxSwg; MV55B: $uploaded_file->save(); goto I3fVe; BKqAm: $uploaded_file = Files::make(["\156\x61\155\145" => $original_name, "\x70\x61\164\x68" => $path, "\144\x69\163\x6b" => $disk, "\165\162\x6c" => $url ?? null, "\x74\171\160\x65" => $type ?? null])->fileable()->associate($model); goto MV55B; SxSwg: } goto S_jPg; o59j_: $target_folder = $folder; goto QTl1r; icF8f: $original_name = $file->getClientOriginalName(); goto nM6uG; nM6uG: $allowedMimeTypes = ["\151\x6d\141\147\145\x2f\152\x70\x65\147", "\x69\x6d\141\147\145\57\x70\156\147"]; goto N1uMr; S_jPg: } } goto L3kNw; Kjv_V: $uploaded_files = []; goto FZ_3d; qNQnR: } public static function getDomain() { return FacadesRequest::getHost(); } }

Function Calls

None

Variables

None

Stats

MD5 ea46ce48491559b3357d2228c7504091
Eval Count 0
Decode Time 44 ms