����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.15.179.145 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/www/common/ |
Upload File : |
<?php use Cocur\Slugify\Slugify; use Illuminate\Http\Request; if (!function_exists('slugify')) { /** * @param string $title * @param string $separator * @return string */ function slugify($title, $separator = '-') { $slugified = (new Slugify())->slugify($title, $separator); // $slugified = Str::slug($title, $separator); if (!$slugified) { $slugified = strtolower( preg_replace('/[\s_]+/', $separator, $title), ); } return $slugified; } } if (!function_exists('castToBoolean')) { /** * @param mixed $string * @return bool|null|string */ function castToBoolean($string) { switch ($string) { case 'true': return true; case 'false': return false; case 'null': return null; default: return (string) $string; } } } if (!function_exists('modelTypeToNamespace')) { function modelTypeToNamespace(string $modelType): string { if (Str::contains($modelType, 'App')) { return $modelType; } return 'App\\' . ucfirst($modelType); } } if (!function_exists('getIp')) { function getIp(Request $request): string { foreach ( [ 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR', ] as $key ) { if (array_key_exists($key, $_SERVER) === true) { foreach (explode(',', $_SERVER[$key]) as $ip) { $ip = trim($ip); // just to be safe if ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE, ) !== false ) { return $ip; } } } } return $request->ip(); } }