/
home
/
henzagold
/
server
/
app
/
Models
/
File Upload :
llllll
Current File: //home/henzagold/server/app/Models/Utility.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Morilog\Jalali\Jalalian; class Utility extends Model { static $formatJ = 'Y/n/j-H:i'; public static function round($value){ //return number_format($value,2); return round($value,2); } public static function convertDate($value, $format = NULL, $farsi = TRUE) { if (is_null($value)) { return NULL; } if (is_null($format)) { $format = self::$formatJ; } return Jalalian::forge($value)->format($format, $farsi); } public static function faTOen($string) { return strtr($string, array('۰'=>'0', '۱'=>'1', '۲'=>'2', '۳'=>'3', '۴'=>'4', '۵'=>'5', '۶'=>'6', '۷'=>'7', '۸'=>'8', '۹'=>'9', '٠'=>'0', '١'=>'1', '٢'=>'2', '٣'=>'3', '٤'=>'4', '٥'=>'5', '٦'=>'6', '٧'=>'7', '٨'=>'8', '٩'=>'9')); } public static function baseURLStorage(){ return 'https://henzagold.com/oapi/storage/'; } }
Copyright ©2k19 -
Hexid
|
Tex7ure