$defaultConfig = (new \Mpdf\Config\ConfigVariables())->getDefaults();
$fontDirs = $defaultConfig['fontDir'];
$defaultFontConfig = (new \Mpdf\Config\FontVariables())->getDefaults();
$fontData = $defaultFontConfig['fontdata'];
$pdf = new Pdf([
...
'options' => [
...
'fontDir' => array_merge($fontDirs, [
Yii::getAlias('@webroot/fonts/'),
]),
'fontdata' => array_merge($fontData, [
"roboto" => [
'R' => "Roboto-Regular.ttf",
'I' => "Roboto-Regular.ttf",
'B' => "Roboto-Bold.ttf",
],
]),
'default_font' => 'roboto'
],
...
]);
const numb = 1234567;
const numbFmt = new Intl.NumberFormat('ru-RU').format(numb);
console.log('Отформатированное число: ' + numbFmt); // 1 234 567
const numb = 1234567;
const numbFmt = numb.toLocaleString('ru-RU');
console.log('Отформатированное число: ' + numbFmt); // 1 234 567
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
https://nodejs.org/en/download/package-manager/#nvm
nvm install node
chmod 755 /root
chmod 755 /root/.nvm
su www-data
vim ~/.bashrc
export PATH=./node_modules/.bin:$PATH
export NVM_DIR="/root/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
exit
which node
ls -la /root/.nvm
Как правильно их разместить в рамках одного Vps?
Какой-нибудь докер - возможно?
Проект не очень большой, как обойтись наименьшими тратами нервов? )
request
, request-promise
has been deprecated
User::find()->andWhere(['like', 'username', '89'])->all();
// SQL: `username` LIKE '89'
User::find()->andWhere(['like', 'username', '%89', false])->all();
User::find()->andWhere(['like', 'username', '89%', false])->all();
User::find()->andWhere(['like', 'username', '%89%', false])->all();
User::find()->andWhere([new \yii\db\Expression('username LIKE :param', [':param' => '%' . $str]),])->all();
User::find()->andWhere([new \yii\db\Expression('username LIKE :param', [':param' => $str . '%']),])->all();
User::find()->andWhere([new \yii\db\Expression('username LIKE :param', [':param' => '%' . $str . '%']),])->all();