⁉️#ERROR
Doctrine\DBAL\Exception
Unknown database type enum requested, Doctrine\DBAL\Platforms\MariaDb1027Platform may not support it.
✅ #SOLUTION
Connect provider or add in any provider 👇
Doctrine\DBAL\Exception
Unknown database type enum requested, Doctrine\DBAL\Platforms\MariaDb1027Platform may not support it.
✅ #SOLUTION
Connect provider or add in any provider 👇
<?php
declare(strict_types=1);
namespace App\Providers;
use DB;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function register()
{
/** @noinspection PhpUnhandledExceptionInspection */
DB::getDoctrineSchemaManager()
->getDatabasePlatform()
->registerDoctrineTypeMapping('enum', 'string');
}
}
❗️Kubernetes Helm Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress.
👉 Article
👉 Helm doc uninstall
#k8s #helm #docker
👉 Article
👉 Helm doc uninstall
#k8s #helm #docker
ℹ️ PHP configuration / extension path helpers
#PHP #extension #configuration
php -i | grep "Loaded Configuration File"
php -i | grep "extension_dir"
php -i | grep "Scan this dir for additional .ini files"
#PHP #extension #configuration
ℹ️ Laravel. Validation. Rules. Require only one of two parameters. Exclude empty data.
❕Laravel >= 8.32 only support.
❕Laravel >= 8.32 only support.
$rules = [#PHP #Laravel #validation #rules
'login' => 'prohibited_unless:email,null|required_without:email',
'email' => 'prohibited_unless:login,null|required_without:login',
];
ℹ️ PHPStorm. Disable code fragment reformat.
1️⃣ Ctrl + Alt + S -> Code Style -> Code Style -> Formatter -> Turn formatter on/off with markers in code comment
2️⃣ Then add in code:
#IDE #JetBrains #PHPStorm #Idea #codestyle #editor #reformat
1️⃣ Ctrl + Alt + S -> Code Style -> Code Style -> Formatter -> Turn formatter on/off with markers in code comment
2️⃣ Then add in code:
@formatter:off
Code in non std format
@formatter:on
#IDE #JetBrains #PHPStorm #Idea #codestyle #editor #reformat
ℹ️ Laravel 9.21 (Cli update)
./artisan about
./artisan model:show User
ℹ️ Xubuntu Notifications
PHP Script at /var/www/cron-schedule/notify.php:
PHP Script at /var/www/cron-schedule/notify.php:
<?phpAliases:
declare(strict_types=1);
$ok = '/var/www/cron-schedule/ok';
do {
`notify-send '$argv[1]!' --expire-time=900`;
sleep(1);
} while (!file_exists($ok));
unlink($ok);
alias ok='touch /var/www/cron-schedule/ok':~$ crontab-edit
alias cron-restart='sudo service cron restart'
alias cron-edit='crontab -e'
SHELL=/bin/bashRestart cron:
*/20 * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/php /var/www/cron-schedule/notify.php "Выпей Воды!"
0 */1 * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/php /var/www/cron-schedule/notify.php "Разминка!"
0 10 * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/php /var/www/cron-schedule/notify.php "Первый Завтрак!"
0 11 * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/php /var/www/cron-schedule/notify.php "Второй Завтрак!"
0 14 * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/php /var/www/cron-schedule/notify.php "Обед!"
0 17 * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/php /var/www/cron-schedule/notify.php "Полдник!"
0 20 * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/php /var/www/cron-schedule/notify.php "Ужин!"
cron-restart#cron #schedule #lifetimemanager #personal
ℹ️ Gitlab. Push and skip pipelines. Not for merge requests.
git push -o ci.skip
#git #gitlab #pipelines
git push -o ci.skip
#git #gitlab #pipelines
ℹ️ Block cron script duplicate execution. Flock.
*/20 * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/flock -n /tmp/water /usr/bin/php /var/www/cron-schedule/notify.php "Выпей Воды!" > /tmp/notify.php 2> /tmp/notify.error.php
#cron #lock #block #duplication #flock
*/20 * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/bin/flock -n /tmp/water /usr/bin/php /var/www/cron-schedule/notify.php "Выпей Воды!" > /tmp/notify.php 2> /tmp/notify.error.php
#cron #lock #block #duplication #flock
Forwarded from Laravel World
В Laravel 9.31 команда
https://github.com/laravel/framework/pull/44211
dd теперь показывает откуда она была вызвана.https://github.com/laravel/framework/pull/44211
Forwarded from Laravel World
This media is not supported in your browser
VIEW IN TELEGRAM
TLDR — плагин для PhpStorm, который подключает искусственный интеллект и тот на чистом английском языке объясняет, что делает ваш код.
https://plugins.jetbrains.com/plugin/20050-tldr
https://plugins.jetbrains.com/plugin/20050-tldr