For Programming
6 subscribers
4 photos
1 video
12 links
Download Telegram
Paramsga shuni qoshib qoying.
'bsVersion' => '4.0',
Yoki
'bsVersion' => '5.0',
strrev() string turidagi malumotni teskari o'girib beradi.
strrev(Urinboev_i) //i_veobnirU
str_replace() string turidagi malumotning bir elementini ikkinchi elementiga o'zgartirish uchun ishlatiladi.
str_replace('el', '', 'Hello world!'); //Hlo world!
yii migrate --migrationPath=@yii/rbac/migrations
yii2ning rbac migratsiaysini yurgizish.
return [
// ...
'components' => [
'authManager' => [
'class' => 'yii\rbac\DbManager',
],
// ...
],
];

RBAC ni baza orqali ishlatish uchun avval authManagerni config/web.php va config/console.php fayillarining componentslari ichiga qo'shib qo'yish kerak.
<?php
$test = new DateTime('02/31/2011');
echo date_format($test, 'Y-m-d H:i:s'); // 2011-03-03 00:00:00
$test = new DateTime('06/31/2011');
echo date_format($test, 'Y-m-d H:i:s'); // 2011-07-01 00:00:00
?>
[['phone_number'], 'match', 'pattern' => '/(\+[9]{2}[8]{1}[0-9]{9})/'],
number_format($sum, 0, ',', ' ')
Forwarded from Ustoz-Shogird Darslari
This media is not supported in your browser
VIEW IN TELEGRAM
cakeresume.com - rezyume qilish uchun qulay sayt

Bu saytda professional shablon va formatlarni taqdim etadi. PDF rezyumeni bepul yuklab oling yoki chop eting yoki unga havolani ulashing.

👉@UstozShogird Darslari
public $when = false;
['chat_id', 'required', 'when' => function($model) {
return $model->type == AuthItem::TYPE_PACKMAN && $model->when == true;
},'enableClientValidation' => false],
botga request contact qilinganda messageni ichida text kelmay qoladi keyin bot qotib qoladi. shuning uchun textni ham issetga olib qo'yish kerak

if(isset($message->text)){
$text = $message->text;
}
Migratsiyada meta-charsetni ham birgalikda korsatib ketish.

$this->createTable('category', [
'id' => $this->primaryKey(),
'title_uz' => $this->string()->notNull(),
'title_ru' => $this->string()->notNull(),
'status' => $this->integer()->notNull(),
],'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB');
Agar yii2da malumotlarni bazaga emoji bilan tushurish kerak bolsa config/db.php charsetni utf8mb4 qilib qo'yish kerak
echo $details->createCommand()->getRawSql();

sql sorovni ozini olib beradi
$model->text = strip_tags($model->text, '<b><strong><i><em><u><ins><s><strike><del><span><tg-spoiler><a><code><pre>');

Kelayotgan malumotlarda html teglar mavjud bolsa faqat shu teglarni qoldirib qolganini olib tashlaydi
html_entity_decode($string);

Matndan &nbsp va shunga o'xshagan elementlarni olib tashlaydi va decode holatga otkizadi