This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// you need GuzzleHttp to send requests | |
// set your configs in properties | |
// use like this : | |
// $sms = new \App\Kavenegar(); | |
// $sms = $sms->verify($username,$smstype,$tokens)->getStatusCode(); | |
namespace App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function psfc ($string){ | |
$string = | |
strtolower(str_replace(' ', '',convert_numbers_to_english(preg_replace('/\s+/', '', $string)))); | |
return $string; | |
} | |
function convert_numbers_to_english($string) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* :not([class *= "icon-"]) { | |
font-family:iranYekan !important; | |
} | |
input,textarea,.js-checkitem-name { | |
display:block; | |
direction:rtl !important; | |
text-align:right !important; | |
} | |
a.action-card { | |
direction:rtl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"hourlyChart": { | |
"xAxis": [ | |
"08", | |
"09", | |
"10", | |
"11", | |
"12" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use ( onkeyup="afterTextChanged(this);" ) in your input element | |
// This function works after user typing . You can change sensivity in line 17 | |
oldKey = 0,differenceInKeyTime = 0,newKey = 0,interval = 0; | |
function afterTextChanged (element){ | |
if(element.value.length == 0) | |
return 0; | |
oldKey = new Date(); | |
clearInterval(interval); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnv no-gzip dont-vary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// work with ( https://github.com/morilog/jalali ) , to send jalali datetime and get gregorian datetime | |
// example : jalali_to_gregorian('1397-01-29 20:20:20) | |
function jalali_to_gregorian ($jalali){ | |
$miladi_array = \Morilog\Jalali\jDateTime::toGregorian( | |
datetime_slice($jalali,'year'), | |
datetime_slice($jalali,'month'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$posts = \DB::select(" | |
Select date_format(created_at, '%H') as hour, count(id) as count | |
From posts WHERE deleted_at IS NULL | |
Group by date_format(created_at, '%H') | |
"); | |
$xAxis = array(); | |
$yAxis = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$results['x'] = []; | |
$results['y'] = []; | |
$results['xy'] = []; | |
for($i=30;$i>=0;$i--) | |
{ | |
$x = date('Y-m-d',strtotime('-'.$i.' days')); | |
$y = Order::where('created_at','like','%'.$x.'%') |